Search in sources :

Example 11 with InProcessLockProvider

use of org.apache.hudi.client.transaction.lock.InProcessLockProvider in project hudi by apache.

the class TestInProcessLockProvider method testLockReleaseByClose.

@Test
public void testLockReleaseByClose() {
    InProcessLockProvider inProcessLockProvider = new InProcessLockProvider(lockConfiguration, hadoopConfiguration);
    assertDoesNotThrow(() -> {
        inProcessLockProvider.lock();
    });
    assertDoesNotThrow(() -> {
        inProcessLockProvider.close();
    });
}
Also used : InProcessLockProvider(org.apache.hudi.client.transaction.lock.InProcessLockProvider) Test(org.junit.jupiter.api.Test)

Aggregations

InProcessLockProvider (org.apache.hudi.client.transaction.lock.InProcessLockProvider)11 Test (org.junit.jupiter.api.Test)11 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)3 CountDownLatch (java.util.concurrent.CountDownLatch)1