Skip to content

Commit 0362003

Browse files
committed
fix: flaky test
1 parent e21f4bb commit 0362003

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/test/java/io/supertokens/storage/postgresql/test/DbConnectionPoolTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,16 @@ public void testMinimumIdleConnectionForTenants() throws Exception {
287287

288288
Thread.sleep(1000); // let the new tenant be ready
289289

290+
for (int retry = 0; retry < 5; retry++) {
291+
try {
292+
assertEquals(10, start.getDbActivityCount("st1"));
293+
break;
294+
} catch (AssertionError e) {
295+
Thread.sleep(1000);
296+
continue;
297+
}
298+
}
299+
290300
assertEquals(10, start.getDbActivityCount("st1"));
291301

292302
// change connection pool size

0 commit comments

Comments
 (0)