azagrebin commented on a change in pull request #10348: [FLINK-14951][tests] 
Harden the thread safety of State TTL backend tests
URL: https://github.com/apache/flink/pull/10348#discussion_r356044632
 
 

 ##########
 File path: 
flink-end-to-end-tests/flink-stream-state-ttl-test/src/main/java/org/apache/flink/streaming/tests/MonotonicTTLTimeProvider.java
 ##########
 @@ -54,14 +57,24 @@
        private static final Object lock = new Object();
 
        @GuardedBy("lock")
-       static long freeze() {
+       static <T, E extends Throwable> T 
doWithFrozenTime(FunctionWithException<Long, T, E> action) throws E {
 
 Review comment:
   I moved this method up because in our code style we try to adhere to the 
following method order in the class:
   ```
   
   static fields
   
   non-static fields
   
   constructor1() { constructor2() }
   
   constructor2() { }
   
   // non static methods:
   
   method1() { method2() }
   
   method2() { method3() }
   
   method3() { }
   
   // static methods:
   
   staticMethod1() { staticMethod2(); staticMethod3(); }
   
   staticMethod2() { }
   
   staticMethod3() { }
   
   inner classes
   
   embedded static classes
   
   ...
   
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to