Skip to content

Commit b5f3cdb

Browse files
committed
Attempt to fix intermittent test failure
1 parent 7f85f65 commit b5f3cdb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/test/org/firebirdsql/jdbc/FBPreparedStatementTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,9 +708,11 @@ void testInsertReturning() throws Exception {
708708
end""";
709709

710710
@Test
711+
@Unstable("Test can be sensitive due to timing issues; if it fails to pass, try increasing delayMs")
711712
void testCancelStatement() throws Exception {
712713
assumeFeature(FirebirdSupportInfo::supportsCancelOperation, "Test requires fb_cancel_operations support");
713714
assumeFeature(FirebirdSupportInfo::supportsExecuteBlock, "Test requires EXECUTE BLOCK support");
715+
final long delayMs = 20;
714716

715717
try (var stmt = con.createStatement()) {
716718
final var cancelFailed = new AtomicBoolean(true);
@@ -721,7 +723,7 @@ void testCancelStatement() throws Exception {
721723
cancelFailed.set(false);
722724
} catch (SQLException ignored) {
723725
}
724-
}, 10, TimeUnit.MILLISECONDS);
726+
}, delayMs, TimeUnit.MILLISECONDS);
725727
executor.shutdown();
726728

727729
var exception = assertThrows(SQLException.class, () -> stmt.execute(LONG_RUNNING_STATEMENT),

0 commit comments

Comments
 (0)