@@ -167,9 +167,6 @@ async def test_farmer_respond_signatures(
167
167
# messages even though it didn't request them, to cover when the farmer doesn't know
168
168
# about an sp_hash, so it fails at the sp record check.
169
169
170
- def log_is_ready () -> bool :
171
- return len (caplog .text ) > 0
172
-
173
170
_ , _ , harvester_service , _ , _ = harvester_farmer_environment
174
171
# We won't have an sp record for this one
175
172
challenge_hash = bytes32 (b"1" * 32 )
@@ -184,11 +181,16 @@ def log_is_ready() -> bool:
184
181
include_source_signature_data = False ,
185
182
farmer_reward_address_override = None ,
186
183
)
184
+
185
+ expected_error = f"Do not have challenge hash { challenge_hash } "
186
+
187
+ def expected_log_is_ready () -> bool :
188
+ return expected_error in caplog .text
189
+
187
190
msg = make_msg (ProtocolMessageTypes .respond_signatures , response )
188
191
await harvester_service ._node .server .send_to_all ([msg ], NodeType .FARMER )
189
- await time_out_assert (15 , log_is_ready )
190
- # We fail the sps record check
191
- expected_error = f"Do not have challenge hash { challenge_hash } "
192
+ await time_out_assert (10 , expected_log_is_ready )
193
+ # We should find the error message
192
194
assert expected_error in caplog .text
193
195
194
196
0 commit comments