test_class.file: Android/app/src/test/java/app/intra/net/doh/RaceTest.java
test_class.identifier: RaceTest
test_case.body: @Test
    public void Success() throws Exception {
      final int N = 7;
      String[] urls = new String[N];
      Semaphore done = new Semaphore(0);
      Race.start(new SuccessProber(), urls, (int index) -> {
        assertTrue(index >= 0);
        assertTrue(index < N);
        done.release();
        if (done.availablePermits() > 1) {
          // Multiple success callbacks.
          fail();
        }
      });
      // Wait for listener to run.
      done.acquire();
    }
test_case.class_method_signature: RaceTest.Success()
test_case.full_signature: @Test public void Success()
test_case.identifier: Success
test_case.invocations: start assertTrue assertTrue release availablePermits fail acquire
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void Success()
focal_class.file: Android/app/src/main/java/app/intra/net/doh/Race.java
focal_class.identifier: Race
focal_class.class_method_signature: Race.start(Context context, String[] urls, Listener listener)
focal_class.full_signature: public static void start(Context context, String[] urls, Listener listener)
focal_class.identifier: start
focal_class.modifiers: public static
focal_class.parameters: (Context context, String[] urls, Listener listener)
focal_class.return: void
focal_class.signature: void start(Context context, String[] urls, Listener listener)
focal_class.class_method_signature: Race.start(Prober prober, String[] urls, Listener listener)
focal_class.full_signature: static void start(Prober prober, String[] urls, Listener listener)
focal_class.identifier: start
focal_class.modifiers: static
focal_class.parameters: (Prober prober, String[] urls, Listener listener)
focal_class.return: void
focal_class.signature: void start(Prober prober, String[] urls, Listener listener)
focal_method.body: public static void start(Context context, String[] urls, Listener listener) {
      Prober prober = new GoProber(context);
      start(prober, urls, listener);
    }
focal_method.class_method_signature: Race.start(Context context, String[] urls, Listener listener)
focal_method.full_signature: public static void start(Context context, String[] urls, Listener listener)
focal_method.identifier: start
focal_method.invocations: start
focal_method.modifiers: public static
focal_method.parameters: (Context context, String[] urls, Listener listener)
focal_method.return: void
focal_method.signature: void start(Context context, String[] urls, Listener listener)