test_class.file: shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/connection/ResourceLockTest.java
test_class.identifier: ResourceLockTest
test_case.body: @Test
      public void assertDoAwait() throws InterruptedException {
          int numberOfThreads = 10;
          ResourceLock resourceLock = new ResourceLock();
          ExecutorService service = Executors.newFixedThreadPool(numberOfThreads);
          CountDownLatch latch = new CountDownLatch(numberOfThreads);
          AtomicInteger counter = new AtomicInteger();
          for (int i = 0; i < numberOfThreads; i++) {
              service.submit(() -> {
                  resourceLock.doAwait();
                  counter.incrementAndGet();
                  latch.countDown();
              });
          }
          latch.await();
          assertThat(numberOfThreads, is(counter.get()));
      }
test_case.class_method_signature: ResourceLockTest.assertDoAwait()
test_case.full_signature: @Test public void assertDoAwait()
test_case.identifier: assertDoAwait
test_case.invocations: newFixedThreadPool submit doAwait incrementAndGet countDown await assertThat is get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertDoAwait()
focal_class.declarator: DEFAULT_TIMEOUT_MILLISECONDS = 200L
focal_class.modifier: private static final
focal_class.original_string: private static final long DEFAULT_TIMEOUT_MILLISECONDS = 200L;
focal_class.type: long
focal_class.var_name: DEFAULT_TIMEOUT_MILLISECONDS
focal_class.declarator: lock = new ReentrantLock()
focal_class.modifier: private final
focal_class.original_string: private final Lock lock = new ReentrantLock();
focal_class.type: Lock
focal_class.var_name: lock
focal_class.declarator: condition = lock.newCondition()
focal_class.modifier: private final
focal_class.original_string: private final Condition condition = lock.newCondition();
focal_class.type: Condition
focal_class.var_name: condition
focal_class.file: shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/connection/ResourceLock.java
focal_class.identifier: ResourceLock
focal_class.class_method_signature: ResourceLock.doAwait()
focal_class.full_signature: @SneakyThrows(InterruptedException.class) public void doAwait()
focal_class.identifier: doAwait
focal_class.modifiers: @SneakyThrows(InterruptedException.class) public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void doAwait()
focal_class.class_method_signature: ResourceLock.doNotify()
focal_class.full_signature: public void doNotify()
focal_class.identifier: doNotify
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void doNotify()
focal_method.body: @SneakyThrows(InterruptedException.class)
      public void doAwait() {
          lock.lock();
          try {
              condition.await(DEFAULT_TIMEOUT_MILLISECONDS, TimeUnit.MILLISECONDS);
          } finally {
              lock.unlock();
          }
      }
focal_method.class_method_signature: ResourceLock.doAwait()
focal_method.full_signature: @SneakyThrows(InterruptedException.class) public void doAwait()
focal_method.identifier: doAwait
focal_method.invocations: lock await unlock
focal_method.modifiers: @SneakyThrows(InterruptedException.class) public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void doAwait()