File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -239,8 +239,9 @@ BOOST_AUTO_TEST_CASE(addrman_select_by_network)
239
239
// ensure that both new and tried table are selected from
240
240
bool new_selected{false };
241
241
bool tried_selected{false };
242
+ int counter = 256 ;
242
243
243
- while (!new_selected || !tried_selected) {
244
+ while (--counter > 0 && ( !new_selected || !tried_selected) ) {
244
245
const CAddress selected{addrman->Select (/* new_only=*/ false , NET_I2P).first };
245
246
BOOST_REQUIRE (selected == i2p_addr || selected == i2p_addr2);
246
247
if (selected == i2p_addr) {
@@ -249,6 +250,9 @@ BOOST_AUTO_TEST_CASE(addrman_select_by_network)
249
250
new_selected = true ;
250
251
}
251
252
}
253
+
254
+ BOOST_CHECK (new_selected);
255
+ BOOST_CHECK (tried_selected);
252
256
}
253
257
254
258
BOOST_AUTO_TEST_CASE (addrman_select_special)
You can’t perform that action at this time.
0 commit comments