mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 08:23:12 +09:00
Prevented race condition in test from affecting result
This commit is contained in:
1 parent
8029067cb2
commit
a78a80f395
1 file changed
+8
-6
@@ -32,16 +32,18 @@ describe("remoteMap/chunkStore.js", () => {
|
|||||||
assert.equal(entity.entity.otherData, "can be arbitrary");
|
assert.equal(entity.entity.otherData, "can be arbitrary");
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
},500)
|
},300);
|
||||||
});
|
});
|
||||||
it("deletes entities when not provided with an object as 3rd arg", done => {
|
it("deletes entities when not provided with an object as 3rd arg", done => {
|
||||||
store.setEntity(inserterX, inserterY).then(entity => {
|
store.setEntity(inserterX, inserterY).then(entity => {
|
||||||
assert(entity === undefined);
|
assert(entity === undefined);
|
||||||
store.getEntity(inserterX, inserterY).then(entities => {
|
setTimeout(()=>{
|
||||||
// console.log(entities)
|
store.getEntity(inserterX, inserterY).then(entities => {
|
||||||
assert.equal(entities.length, 0, "Why are we getting results, it should be empty?");
|
// console.log(entities)
|
||||||
done();
|
assert.equal(entities.length, 0, "Why are we getting results, it should be empty?");
|
||||||
});
|
done();
|
||||||
|
});
|
||||||
|
},300);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
Reference in new issue
Block a user