Skip to content

Commit 7ce9837

Browse files
authored
Add retry to ValueStoreWalSearchTest (#5605)
1 parent 37c4f7a commit 7ce9837

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

core/sail/nativerdf/src/test/java/org/eclipse/rdf4j/sail/nativerdf/wal/ValueStoreWalSearchTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,13 @@ void findsValueByIdViaSegmentProbe() throws Exception {
6767
Integer pickId = ids[new Random().nextInt(ids.length)];
6868

6969
ValueStoreWalSearch search = ValueStoreWalSearch.open(cfgRead);
70-
Value found = search.findValueById(pickId);
70+
Value found = null;
71+
for (int attempt = 0; attempt < 10 && found == null; attempt++) {
72+
found = search.findValueById(pickId);
73+
if (found == null) {
74+
Thread.sleep(100);
75+
}
76+
}
7177
assertThat(found).as("ValueStoreWalSearch should find value by id").isNotNull();
7278

7379
// Cross-check against ValueStore

0 commit comments

Comments
 (0)