Fix PreparedStatementCachingIT for reelz

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Normal
    • None
    • Component/s: None
    • None

      This test is quite flaky; it fails randomly, presumably due to timing issues.  The following is pretty representative:

       

      Error Message
      
      preparedStmtCacheRemoveLatch did not trigger before timeout expected:<[tru]e> but was:<[fals]e>
      
      Stacktrace
      
      org.junit.ComparisonFailure: preparedStmtCacheRemoveLatch did not trigger before timeout expected:<[tru]e> but was:<[fals]e>
      	at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
      	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
      	at com.datastax.oss.driver.core.cql.PreparedStatementCachingIT.invalidationTestInner(PreparedStatementCachingIT.java:274)
      	at com.datastax.oss.driver.core.cql.PreparedStatementCachingIT.invalidationResultSetTest(PreparedStatementCachingIT.java:195)
      	at com.datastax.oss.driver.core.cql.PreparedStatementCachingIT.lambda$should_invalidate_cache_entry_on_basic_udt_change_result_set$5(PreparedStatementCachingIT.java:308)
      	at com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer.withLock(SchemaChangeSynchronizer.java:33)
      	at com.datastax.oss.driver.core.cql.PreparedStatementCachingIT.should_invalidate_cache_entry_on_basic_udt_change_result_set(PreparedStatementCachingIT.java:306)
      	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
      ...

      This test was created by me as part of work done on JAVA-3062.  Seems like we should be able to find a way to clean them up that doesn't rely as much on timing.

            Assignee:
            Unassigned
            Reporter:
            Bret McGuire
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: