Skip to content

Commit 63aa155

Browse files
committed
adjust integration tests for 1 slot queue worker
reason: with only 1 slot queue worker, downloading of slots no longer happens in parallel and therefore takes longer
1 parent d790772 commit 63aa155

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

tests/integration/testmarketplace.nim

+11-11
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ twonodessuite "Marketplace", debug1 = false, debug2 = false:
2424
let cid = client1.upload(data).get
2525
let id = client1.requestStorage(
2626
cid,
27-
duration=10*60.u256,
27+
duration=20*60.u256,
2828
reward=400.u256,
2929
proofProbability=3.u256,
30-
expiry=5*60,
30+
expiry=10*60,
3131
collateral=200.u256,
32-
nodes = 5,
33-
tolerance = 2).get
32+
nodes = 3,
33+
tolerance = 1).get
3434

35-
check eventually(client1.purchaseStateIs(id, "started"), timeout=5*60*1000)
35+
check eventually(client1.purchaseStateIs(id, "started"), timeout=10*60*1000)
3636
let purchase = client1.getPurchase(id).get
3737
check purchase.error == none string
3838
let availabilities = client2.getAvailabilities().get
@@ -41,7 +41,7 @@ twonodessuite "Marketplace", debug1 = false, debug2 = false:
4141
check newSize > 0 and newSize < size
4242

4343
let reservations = client2.getAvailabilityReservations(availability.id).get
44-
check reservations.len == 5
44+
check reservations.len == 3
4545
check reservations[0].requestId == purchase.requestId
4646

4747
test "node slots gets paid out and rest of tokens are returned to client":
@@ -51,8 +51,8 @@ twonodessuite "Marketplace", debug1 = false, debug2 = false:
5151
let tokenAddress = await marketplace.token()
5252
let token = Erc20Token.new(tokenAddress, ethProvider.getSigner())
5353
let reward = 400.u256
54-
let duration = 10*60.u256
55-
let nodes = 5'u
54+
let duration = 20*60.u256
55+
let nodes = 3'u
5656

5757
# client 2 makes storage available
5858
let startBalanceHost = await token.balanceOf(account2)
@@ -65,12 +65,12 @@ twonodessuite "Marketplace", debug1 = false, debug2 = false:
6565
duration=duration,
6666
reward=reward,
6767
proofProbability=3.u256,
68-
expiry=5*60,
68+
expiry=10*60,
6969
collateral=200.u256,
7070
nodes = nodes,
71-
tolerance = 2).get
71+
tolerance = 1).get
7272

73-
check eventually(client1.purchaseStateIs(id, "started"), timeout=5*60*1000)
73+
check eventually(client1.purchaseStateIs(id, "started"), timeout=10*60*1000)
7474
let purchase = client1.getPurchase(id).get
7575
check purchase.error == none string
7676

tests/integration/testsales.nim

+5-5
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ twonodessuite "Sales", debug1 = false, debug2 = false:
6060
let cid = client2.upload(data).get
6161
let id = client2.requestStorage(
6262
cid,
63-
duration=10*60.u256,
63+
duration=20*60.u256,
6464
reward=400.u256,
6565
proofProbability=3.u256,
66-
expiry=5*60,
66+
expiry=10*60,
6767
collateral=200.u256,
68-
nodes = 5,
69-
tolerance = 2).get
68+
nodes = 3,
69+
tolerance = 1).get
7070

71-
check eventually(client2.purchaseStateIs(id, "started"), timeout=5*60*1000)
71+
check eventually(client2.purchaseStateIs(id, "started"), timeout=10*60*1000)
7272
let updatedAvailability = (client1.getAvailabilities().get).findItem(availability).get
7373
check updatedAvailability.totalSize != updatedAvailability.freeSize
7474

0 commit comments

Comments
 (0)