Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ public void testExecuteQueryChainFailure() throws SQLException {
doThrow(new SQLException()).when(connSpy1).createStatement();
parallelConn.createStatement().execute("SELECT * FROM SYSTEM.CATALOG");
hbaseTestingUtility.waitFor(WAIT_MS, () -> numStatementsCreatedOnConn2.get() == 3);
// Conn1 can fail on its own executor thread after the caller returns.
// Wait for this failure before the test restores the stub.
hbaseTestingUtility.waitFor(WAIT_MS,
() -> context.getChainOnConn1().isCompletedExceptionally());
doAnswer(answer1).when(connSpy1).createStatement();
// Should still have a successful execution only from conn2 since conn1 errored before
parallelConn.createStatement().execute("SELECT * FROM SYSTEM.CATALOG");
Expand Down
Loading