From bf722344973fb488f8f8965203260c936babf548 Mon Sep 17 00:00:00 2001 From: librelois <elois@ifee.fr> Date: Wed, 29 Apr 2020 19:33:24 +0200 Subject: [PATCH] Revert "[tests] reproduce bug #1402" This reverts commit 04d16320ae613ce1db30a510f6002cf96604dc2b. --- .../coming-back-with-less-than-sigqty.ts | 19 +++++-------------- test/integration/tools/TestUser.ts | 2 +- test/integration/tools/toolbox.ts | 2 +- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/test/integration/fork-resolution/coming-back-with-less-than-sigqty.ts b/test/integration/fork-resolution/coming-back-with-less-than-sigqty.ts index a534c5751..e89ba3637 100644 --- a/test/integration/fork-resolution/coming-back-with-less-than-sigqty.ts +++ b/test/integration/fork-resolution/coming-back-with-less-than-sigqty.ts @@ -81,17 +81,8 @@ describe('A member coming back with less than `sigQty` valid certs total', () => await s1.commit({ time: now + 13 }) await s1.commit({ time: now + 13 }) const c1 = await cat.makeCert(toc) // <-- a renewal ==> this is what we want to observe - const join = await toc.makeMembership('IN'); - - // Inject c1 & join in mempool - await cat.sendCert(c1) - await toc.sendMembership(join) - - // Generate potential next bloc, must NOT include toc join (#1402) - const b_gen = s1.generateNext({ time: now + 13 }) - assertEqual((await b_gen).joiners.length, 0); - - // Try to force toc coming back, must be fail because toc not have enough certs (#1394) + const join = await toc.makeMembership('IN') + // toc is **NOT** coming back! not enough certs await assertThrows(s1.commit({ time: now + 13, joiners: [join], @@ -99,13 +90,13 @@ describe('A member coming back with less than `sigQty` valid certs total', () => }), 'BLOCK_WASNT_COMMITTED') // BUT is coming back with 1 more cert const c2 = await tac.makeCert(toc) - const b2 = await s1.commit({ + const b = await s1.commit({ time: now + 13, joiners: [join], certifications: [c1, c2] }) - assertEqual(b2.membersCount, 3) // <--- toc is welcome back :) - assertEqual(b2.number, 12) + assertEqual(b.membersCount, 3) // <--- toc is welcome back :) + assertEqual(b.number, 12) }) after(() => { diff --git a/test/integration/tools/TestUser.ts b/test/integration/tools/TestUser.ts index 86619853e..375b7b107 100644 --- a/test/integration/tools/TestUser.ts +++ b/test/integration/tools/TestUser.ts @@ -98,7 +98,7 @@ export class TestUser { return this.createdIdentity } - public async makeCert(user:TestUser, fromServer?:TestingServer, overrideProps?:any): Promise<CertificationDTO> { + public async makeCert(user:TestUser, fromServer?:TestingServer, overrideProps?:any) { const lookup = await this.lookup(user.pub, fromServer) const current = await this.node.server.BlockchainService.current() const idty = Underscore.filter(lookup.results[0].uids, uidEntry => uidEntry.uid === user.uid)[0] diff --git a/test/integration/tools/toolbox.ts b/test/integration/tools/toolbox.ts index 312b7f8c0..4ffb3d58d 100644 --- a/test/integration/tools/toolbox.ts +++ b/test/integration/tools/toolbox.ts @@ -528,7 +528,7 @@ export class TestingServer { return blocksResolved } - async generateNext(options:any) { + private generateNext(options:any) { const server = this.server as any // Brings a priver to the server if (!server._utProver) { -- GitLab