• Ate Douma's avatar
    REPO-1887 [Backport 11.2] LockManager unit tests improvements · c7572bae
    Ate Douma authored
    (cherry picked from commit 77715d79)
    
    A couple of tests have the following pattern:
     @Test
        public void assert_something() throws Exception {
            Thread lockThread = new Thread(() -> {
                fail("I failed");
            });
            lockThread.start();
            lockThread.join();
        }
    The problem with this pattern is that although something gets logged like
    Exception in thread "Thread-2" java.lang.AssertionError: I failed
    the test itself just passes because the Thread the runs the test didn't get the exception
    
    Next to this, also improved the LockManagerBasicTest to not use Thread.sleep
    and also include the LockResource in its tests
    
    (cherry picked from commit f46028aa)
    c7572bae
.gitignore 94 Bytes