Skip to content

Commit 4ecaff2

Browse files
looking for error
1 parent 14c2f47 commit 4ecaff2

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

tests/e2e_tests/test_commit_weights.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -233,23 +233,23 @@ async def test_commit_weights_uses_next_nonce(local_chain, subtensor, alice_wall
233233
salt=salt,
234234
uids=weight_uids,
235235
weights=weight_vals,
236-
wait_for_inclusion=False, # Don't wait for inclusion, we are testing the nonce when there is a tx in the pool
236+
wait_for_inclusion=True, # Don't wait for inclusion, we are testing the nonce when there is a tx in the pool
237237
wait_for_finalization=False,
238238
)
239239

240-
assert success is True
240+
assert success is True, message
241241

242242
success, message = subtensor.commit_weights(
243243
alice_wallet,
244244
netuid,
245245
salt=salt2,
246246
uids=weight_uids,
247247
weights=weight_vals,
248-
wait_for_inclusion=False,
248+
wait_for_inclusion=True,
249249
wait_for_finalization=False,
250250
)
251251

252-
assert success is True
252+
assert success is True, message
253253

254254
# Commit the third salt
255255
success, message = subtensor.commit_weights(
@@ -258,11 +258,11 @@ async def test_commit_weights_uses_next_nonce(local_chain, subtensor, alice_wall
258258
salt=salt3,
259259
uids=weight_uids,
260260
weights=weight_vals,
261-
wait_for_inclusion=False,
261+
wait_for_inclusion=True,
262262
wait_for_finalization=False,
263263
)
264264

265-
assert success is True
265+
assert success is True, message
266266

267267
# Wait a few blocks
268268
await asyncio.sleep(10) # Wait for the txs to be included in the chain

tests/e2e_tests/test_set_weights.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ async def test_set_weights_uses_next_nonce(local_chain, subtensor, alice_wallet)
113113
netuid,
114114
uids=weight_uids,
115115
weights=weight_vals,
116-
wait_for_inclusion=False, # Don't wait for inclusion, we are testing the nonce when there is a tx in the pool
116+
wait_for_inclusion=True, # Don't wait for inclusion, we are testing the nonce when there is a tx in the pool
117117
wait_for_finalization=False,
118118
)
119119

120-
assert success is True, f"Failed to set weights for subnet {netuid}"
120+
assert success is True, message
121121

122122
# Wait for the txs to be included in the chain
123123
await wait_epoch(subtensor, netuid=netuids[-1], times=4)

tests/e2e_tests/utils/e2e_test_utils.py

+2
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ async def __aexit__(self, exc_type, exc_value, traceback):
179179

180180
async def _reader(self):
181181
async for line in self.process.stdout:
182+
print(line)
183+
182184
if b"Starting validator loop." in line:
183185
self.started.set()
184186
elif b"Successfully set weights and Finalized." in line:

0 commit comments

Comments
 (0)