You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/09/08 15:45:46 UTC

[GitHub] [beam] Abacn commented on a diff in pull request #23019: [Test] Decrease derby.locks.waitTimeout in jdbc unit test

Abacn commented on code in PR #23019:
URL: https://github.com/apache/beam/pull/23019#discussion_r966132451


##########
sdks/java/io/jdbc/src/test/java/org/apache/beam/sdk/io/jdbc/JdbcIOExceptionHandlingParameterizedTest.java:
##########
@@ -53,6 +54,14 @@ public class JdbcIOExceptionHandlingParameterizedTest {
           "org.apache.derby.jdbc.EmbeddedDriver", "jdbc:derby:memory:testDB;create=true");
   private static final DataSource DATA_SOURCE = DATA_SOURCE_CONFIGURATION.buildDatasource();
 
+  @BeforeClass
+  public static void beforeClass() {
+    // by default, derby uses a lock timeout of 60 seconds. In order to speed up the test
+    // and detect the lock faster, we decrease this timeout
+    System.setProperty("derby.locks.waitTimeout", "2");
+    System.setProperty("derby.stream.error.file", "build/derby.log");

Review Comment:
   That would make JdbcIOTest stuck again. What happens is that the timeout setting set once in JdbcIOTest.beforeClass somehow gets reset if JdbcIOExceptionHandlingParameterizedTest is running, as both uses same embed derby server.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org