Auction Tests failing #22

Closed
opened 2023-01-18 18:25:15 +00:00 by ABastionOfSanity · 5 comments
ABastionOfSanity commented 2023-01-18 18:25:15 +00:00 (Migrated from github.com)

The auction tests are currently failing and disabled.
yarn test:auctions
Results:

FAIL src/auction.test.ts (414.615 s)
Auction (1 bidder)
✓ Setup bidder accounts (3741 ms)
✓ Reserve authority. (5006 ms)
✕ Authority should be under auction. (7 ms)
✕ Commit bids. (4 ms)
✕ Check bids are committed (4 ms)
✓ Wait for reveal phase. (60000 ms)
✕ Reveal bids. (3 ms)
✕ Check bids are revealed (2 ms)
✓ Wait for auction completion. (60001 ms)
✕ Check auction winner, authority owner and status. (3 ms)
Auction (2 bidders)
✓ Setup bidder accounts (10301 ms)
✓ Reserve authority. (5012 ms)
✕ Authority should be under auction. (4 ms)
✕ Commit bids. (1 ms)
✕ Check bids are committed (2 ms)
✓ Wait for reveal phase. (60002 ms)
✕ Reveal bids. (2 ms)
✕ Check bids are revealed (2 ms)
✓ Wait for auction completion. (60001 ms)
✕ Check auction winner, authority owner and status. (2 ms)
Auction (4 bidders)
✓ Setup bidder accounts (20477 ms)
✓ Reserve authority. (5016 ms)
✕ Authority should be under auction. (5 ms)
✕ Commit bids.
✕ Check bids are committed (3 ms)
✓ Wait for reveal phase. (60001 ms)
✕ Reveal bids. (4 ms)
✕ Check bids are revealed (2 ms)
✓ Wait for auction completion. (60001 ms)
✕ Check auction winner, authority owner and status. (2 ms)

The auction tests are currently failing and disabled. yarn test:auctions Results: > FAIL src/auction.test.ts (414.615 s) > Auction (1 bidder) > ✓ Setup bidder accounts (3741 ms) > ✓ Reserve authority. (5006 ms) > ✕ Authority should be under auction. (7 ms) > ✕ Commit bids. (4 ms) > ✕ Check bids are committed (4 ms) > ✓ Wait for reveal phase. (60000 ms) > ✕ Reveal bids. (3 ms) > ✕ Check bids are revealed (2 ms) > ✓ Wait for auction completion. (60001 ms) > ✕ Check auction winner, authority owner and status. (3 ms) > Auction (2 bidders) > ✓ Setup bidder accounts (10301 ms) > ✓ Reserve authority. (5012 ms) > ✕ Authority should be under auction. (4 ms) > ✕ Commit bids. (1 ms) > ✕ Check bids are committed (2 ms) > ✓ Wait for reveal phase. (60002 ms) > ✕ Reveal bids. (2 ms) > ✕ Check bids are revealed (2 ms) > ✓ Wait for auction completion. (60001 ms) > ✕ Check auction winner, authority owner and status. (2 ms) > Auction (4 bidders) > ✓ Setup bidder accounts (20477 ms) > ✓ Reserve authority. (5016 ms) > ✕ Authority should be under auction. (5 ms) > ✕ Commit bids. > ✕ Check bids are committed (3 ms) > ✓ Wait for reveal phase. (60001 ms) > ✕ Reveal bids. (4 ms) > ✕ Check bids are revealed (2 ms) > ✓ Wait for auction completion. (60001 ms) > ✕ Check auction winner, authority owner and status. (2 ms)
ABastionOfSanity commented 2023-01-18 18:26:54 +00:00 (Migrated from github.com)

@i-norden I added this issue so we are all aware. Within this test, I think RevealBid may be only endpoint still using the cbor.FromJSON call.

@i-norden I added this issue so we are all aware. Within this test, I think RevealBid may be only endpoint still using the cbor.FromJSON call.
Member
maybe related to https://github.com/cerc-io/laconic-registry-cli/issues/18 ?
Member

This is running against v0.7.0 laconicd?

This is running against v0.7.0 laconicd?
Member

out of curiosity i tried with v0.7.0 and they mostly passed

Zachs-MacBook-Air:laconic-sdk stars$ yarn test:auctions
yarn run v1.22.19
$ TEST_AUCTIONS_ENABLED=1 jest --runInBand --verbose src/auction.test.ts
  console.log
    Running auction tests with num bidders 1

      at src/auction.test.ts:17:13

  console.log
    Running auction tests with num bidders 2

      at src/auction.test.ts:17:13

  console.log
    Running auction tests with num bidders 4

      at src/auction.test.ts:17:13

 FAIL  src/auction.test.ts (1487.623 s)
  Auction (1 bidder)
    ✓ Setup bidder accounts (1802 ms)
    ✓ Reserve authority. (5102 ms)
    ✓ Authority should be under auction. (10 ms)
    ✓ Commit bids. (5054 ms)
    ✓ Check bids are committed (7 ms)
    ✓ Wait for reveal phase. (60002 ms)
    ✓ Reveal bids. (984 ms)
    ✓ Check bids are revealed (4 ms)
    ✓ Wait for auction completion. (60002 ms)
    ✓ Check auction winner, authority owner and status. (16 ms)
  Auction (2 bidders)
    ✓ Setup bidder accounts (5959 ms)
    ✓ Reserve authority. (5069 ms)
    ✓ Authority should be under auction. (7 ms)
    ✓ Commit bids. (10146 ms)
    ✓ Check bids are committed (5 ms)
    ✓ Wait for reveal phase. (61978 ms)
    ✓ Reveal bids. (11103 ms)
    ✓ Check bids are revealed (4 ms)
    ✓ Wait for auction completion. (60000 ms)
    ✓ Check auction winner, authority owner and status. (8 ms)
  Auction (4 bidders)
    ✓ Setup bidder accounts (16038 ms)
    ✓ Reserve authority. (5020 ms)
    ✓ Authority should be under auction. (4 ms)
    ✓ Commit bids. (20244 ms)
    ✓ Check bids are committed (7 ms)
    ✓ Wait for reveal phase. (60001 ms)
    ✓ Reveal bids. (15978 ms)
    ✓ Check bids are revealed (9 ms)
    ✓ Wait for auction completion. (1071569 ms)
    ✕ Check auction winner, authority owner and status. (200 ms)

  ● Auction (4 bidders) › Check auction winner, authority owner and status.

    expect(received).toEqual(expected) // deep equality

    Expected: "completed"
    Received: "reveal"

      93 |   test('Check auction winner, authority owner and status.', async () => {
      94 |     const [auction] = await registry.getAuctionsByIds([auctionId]);
    > 95 |     expect(auction.status).toEqual('completed');
         |                            ^
      96 |
      97 |     const highestBidder = accounts[accounts.length - 1];
      98 |     const secondHighestBidder = (accounts.length > 1 ? accounts[accounts.length - 2] : highestBidder);

      at src/auction.test.ts:95:28
      at fulfilled (src/auction.test.ts:5:58)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 29 passed, 30 total
Snapshots:   0 total
Time:        1488.213 s
Ran all test suites matching /src\/auction.test.ts/i.
error Command failed with exit code 1.
out of curiosity i tried with v0.7.0 and they mostly passed ``` Zachs-MacBook-Air:laconic-sdk stars$ yarn test:auctions yarn run v1.22.19 $ TEST_AUCTIONS_ENABLED=1 jest --runInBand --verbose src/auction.test.ts console.log Running auction tests with num bidders 1 at src/auction.test.ts:17:13 console.log Running auction tests with num bidders 2 at src/auction.test.ts:17:13 console.log Running auction tests with num bidders 4 at src/auction.test.ts:17:13 FAIL src/auction.test.ts (1487.623 s) Auction (1 bidder) ✓ Setup bidder accounts (1802 ms) ✓ Reserve authority. (5102 ms) ✓ Authority should be under auction. (10 ms) ✓ Commit bids. (5054 ms) ✓ Check bids are committed (7 ms) ✓ Wait for reveal phase. (60002 ms) ✓ Reveal bids. (984 ms) ✓ Check bids are revealed (4 ms) ✓ Wait for auction completion. (60002 ms) ✓ Check auction winner, authority owner and status. (16 ms) Auction (2 bidders) ✓ Setup bidder accounts (5959 ms) ✓ Reserve authority. (5069 ms) ✓ Authority should be under auction. (7 ms) ✓ Commit bids. (10146 ms) ✓ Check bids are committed (5 ms) ✓ Wait for reveal phase. (61978 ms) ✓ Reveal bids. (11103 ms) ✓ Check bids are revealed (4 ms) ✓ Wait for auction completion. (60000 ms) ✓ Check auction winner, authority owner and status. (8 ms) Auction (4 bidders) ✓ Setup bidder accounts (16038 ms) ✓ Reserve authority. (5020 ms) ✓ Authority should be under auction. (4 ms) ✓ Commit bids. (20244 ms) ✓ Check bids are committed (7 ms) ✓ Wait for reveal phase. (60001 ms) ✓ Reveal bids. (15978 ms) ✓ Check bids are revealed (9 ms) ✓ Wait for auction completion. (1071569 ms) ✕ Check auction winner, authority owner and status. (200 ms) ● Auction (4 bidders) › Check auction winner, authority owner and status. expect(received).toEqual(expected) // deep equality Expected: "completed" Received: "reveal" 93 | test('Check auction winner, authority owner and status.', async () => { 94 | const [auction] = await registry.getAuctionsByIds([auctionId]); > 95 | expect(auction.status).toEqual('completed'); | ^ 96 | 97 | const highestBidder = accounts[accounts.length - 1]; 98 | const secondHighestBidder = (accounts.length > 1 ? accounts[accounts.length - 2] : highestBidder); at src/auction.test.ts:95:28 at fulfilled (src/auction.test.ts:5:58) Test Suites: 1 failed, 1 total Tests: 1 failed, 29 passed, 30 total Snapshots: 0 total Time: 1488.213 s Ran all test suites matching /src\/auction.test.ts/i. error Command failed with exit code 1. ```
ABastionOfSanity commented 2023-02-03 16:26:55 +00:00 (Migrated from github.com)

Cleaned up and integrated into CI/CD

Cleaned up and integrated into CI/CD
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cerc-io/laconic-sdk#22