Skip to content

Commit

Permalink
revert: use simple executor.shutdown() in testFastCloses
Browse files Browse the repository at this point in the history
This partially reverts 39c73a6
  • Loading branch information
vlsi committed Mar 6, 2020
1 parent b004c70 commit fc5467c
Showing 1 changed file with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.postgresql.core.ServerVersion;
import org.postgresql.jdbc.PgStatement;
import org.postgresql.test.TestUtil;
import org.postgresql.util.PSQLException;
import org.postgresql.util.PSQLState;

import org.junit.After;
Expand Down Expand Up @@ -960,20 +959,7 @@ public Void call() throws Exception {
cnt.put(sqlState, val);
}
System.out.println("[testFastCloses] total counts for each sql state: " + cnt);
try {
executor.shutdownNow();
executor.awaitTermination(1000, TimeUnit.MILLISECONDS);
// just close the connection to avoid lingering cancel requests from above
con.close();
con = TestUtil.openDB();
} catch ( PSQLException ex ) {
// draining out any cancel
if ( !ex.getServerErrorMessage().getMessage().startsWith("canceling statement due to user request")) {
throw ex;
}
} catch ( InterruptedException ex ) {

}
executor.shutdown();
}

/**
Expand Down

0 comments on commit fc5467c

Please sign in to comment.