Do not rely on nim-waku trace logs for test purposes

This commit is contained in:
Franck Royer 2021-04-13 09:50:33 +10:00
parent 29a3ec403c
commit e534e0a4c8
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
2 changed files with 11 additions and 5 deletions

@ -1 +1 @@
Subproject commit 5d138f8a2c3f18703cfe6f7497e5d3fba074cdf2 Subproject commit 5747ff5be00b7b99e61021c17a975761fbe151f3

View File

@ -133,9 +133,12 @@ describe('Waku Relay', () => {
await waku.relay.publish(message); await waku.relay.publish(message);
await nimWaku.waitForLog('WakuMessage received'); let msgs = [];
const msgs = await nimWaku.messages(); while (msgs.length === 0) {
await delay(200);
msgs = await nimWaku.messages();
}
expect(msgs[0].contentTopic).to.equal(message.contentTopic); expect(msgs[0].contentTopic).to.equal(message.contentTopic);
expect(msgs[0].version).to.equal(message.version); expect(msgs[0].version).to.equal(message.version);
@ -206,9 +209,12 @@ describe('Waku Relay', () => {
await waku.relay.publish(message); await waku.relay.publish(message);
await nimWaku.waitForLog('WakuMessage received'); let msgs = [];
const msgs = await nimWaku.messages(); while (msgs.length === 0) {
await delay(200);
msgs = await nimWaku.messages();
}
expect(msgs[0].contentTopic).to.equal(message.contentTopic); expect(msgs[0].contentTopic).to.equal(message.contentTopic);
expect(msgs[0].version).to.equal(message.version); expect(msgs[0].version).to.equal(message.version);