clebertsuconic commented on a change in pull request #3950:
URL: https://github.com/apache/activemq-artemis/pull/3950#discussion_r806866268



##########
File path: 
artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/jdbc/JdbcLeaseLockTest.java
##########
@@ -116,6 +122,22 @@ public void dropLockTable() throws Exception {
       jdbcSharedStateManager.close();
    }
 
+   @Test
+   public void shouldStillHeldLockOnTimeZoneChange() {
+      
Assume.assumeThat(PropertySQLProvider.Factory.identifyDialect(dbConf.getJdbcDriverClassName()),
 CoreMatchers.is(PropertySQLProvider.Factory.SQLDialect.DERBY));
+      TimeZone.setDefault(TimeZone.getTimeZone(ZoneId.of("-1")));
+      final long expirationMillis = Duration.ofMinutes(30).toMillis();
+      final LeaseLock lock = lock(expirationMillis);
+      Assert.assertTrue("Must acquire the lock!", lock.tryAcquire());
+      TimeZone.setDefault(TimeZone.getTimeZone(ZoneId.of("+3")));

Review comment:
       this all look good to me, can't we merge this already?




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to