test_class.file: hystrix-core/src/test/java/com/netflix/hystrix/HystrixTest.java
test_class.identifier: HystrixTest
test_case.body: @Test
      public void testMultipleSemaphoreObservableCommandsInFlight() throws InterruptedException {
          int NUM_COMMANDS = 50;
          List<Observable<Integer>> commands = new ArrayList<Observable<Integer>>();
          for (int i = 0; i < NUM_COMMANDS; i++) {
              commands.add(Observable.defer(new Func0<Observable<Integer>>() {
                  @Override
                  public Observable<Integer> call() {
                      return new AsynchronousObservableCommand().observe();
                  }
              }));
          }
  
          final AtomicBoolean exceptionFound = new AtomicBoolean(false);
  
          final CountDownLatch latch = new CountDownLatch(1);
  
          Observable.merge(commands).subscribe(new Subscriber<Integer>() {
              @Override
              public void onCompleted() {
                  System.out.println("OnCompleted");
                  latch.countDown();
              }
  
              @Override
              public void onError(Throwable e) {
                  System.out.println("OnError : " + e);
                  e.printStackTrace();
                  exceptionFound.set(true);
                  latch.countDown();
              }
  
              @Override
              public void onNext(Integer n) {
                  System.out.println("OnNext : " + n + " : " + Thread.currentThread().getName() + " : " + Hystrix.getCommandCount());// + " : " + Hystrix.getCurrentThreadExecutingCommand().name() + " : " + Hystrix.getCommandCount());
              }
          });
  
          latch.await();
  
          assertFalse(exceptionFound.get());
      }
test_case.class_method_signature: HystrixTest.testMultipleSemaphoreObservableCommandsInFlight()
test_case.full_signature: @Test public void testMultipleSemaphoreObservableCommandsInFlight()
test_case.identifier: testMultipleSemaphoreObservableCommandsInFlight
test_case.invocations: add defer observe subscribe merge println countDown println printStackTrace set countDown println getName currentThread getCommandCount await assertFalse get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMultipleSemaphoreObservableCommandsInFlight()
focal_class.declarator: logger = LoggerFactory.getLogger(Hystrix.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(Hystrix.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: currentCommand = new ThreadLocal<ConcurrentStack<HystrixCommandKey>>() {
          @Override
          protected ConcurrentStack<HystrixCommandKey> initialValue() {
              return new ConcurrentStack<HystrixCommandKey>();
          }
      }
focal_class.modifier: private static
focal_class.original_string: private static ThreadLocal<ConcurrentStack<HystrixCommandKey>> currentCommand = new ThreadLocal<ConcurrentStack<HystrixCommandKey>>() {
          @Override
          protected ConcurrentStack<HystrixCommandKey> initialValue() {
              return new ConcurrentStack<HystrixCommandKey>();
          }
      };
focal_class.type: ThreadLocal<ConcurrentStack<HystrixCommandKey>>
focal_class.var_name: currentCommand
focal_class.file: hystrix-core/src/main/java/com/netflix/hystrix/Hystrix.java
focal_class.identifier: Hystrix
focal_class.class_method_signature: Hystrix.reset()
focal_class.full_signature: public static void reset()
focal_class.identifier: reset
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void reset()
focal_class.class_method_signature: Hystrix.reset(long time, TimeUnit unit)
focal_class.full_signature: public static void reset(long time, TimeUnit unit)
focal_class.identifier: reset
focal_class.modifiers: public static
focal_class.parameters: (long time, TimeUnit unit)
focal_class.return: void
focal_class.signature: void reset(long time, TimeUnit unit)
focal_class.class_method_signature: Hystrix._reset()
focal_class.full_signature: private static void _reset()
focal_class.identifier: _reset
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void _reset()
focal_class.class_method_signature: Hystrix.getCurrentThreadExecutingCommand()
focal_class.full_signature: public static HystrixCommandKey getCurrentThreadExecutingCommand()
focal_class.identifier: getCurrentThreadExecutingCommand
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: HystrixCommandKey
focal_class.signature: HystrixCommandKey getCurrentThreadExecutingCommand()
focal_class.class_method_signature: Hystrix.startCurrentThreadExecutingCommand(HystrixCommandKey key)
focal_class.full_signature: static Action0 startCurrentThreadExecutingCommand(HystrixCommandKey key)
focal_class.identifier: startCurrentThreadExecutingCommand
focal_class.modifiers: static
focal_class.parameters: (HystrixCommandKey key)
focal_class.return: Action0
focal_class.signature: Action0 startCurrentThreadExecutingCommand(HystrixCommandKey key)
focal_class.class_method_signature: Hystrix.endCurrentThreadExecutingCommand()
focal_class.full_signature: static void endCurrentThreadExecutingCommand()
focal_class.identifier: endCurrentThreadExecutingCommand
focal_class.modifiers: static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void endCurrentThreadExecutingCommand()
focal_class.class_method_signature: Hystrix.endCurrentThreadExecutingCommand(ConcurrentStack<HystrixCommandKey> list)
focal_class.full_signature: private static void endCurrentThreadExecutingCommand(ConcurrentStack<HystrixCommandKey> list)
focal_class.identifier: endCurrentThreadExecutingCommand
focal_class.modifiers: private static
focal_class.parameters: (ConcurrentStack<HystrixCommandKey> list)
focal_class.return: void
focal_class.signature: void endCurrentThreadExecutingCommand(ConcurrentStack<HystrixCommandKey> list)
focal_class.class_method_signature: Hystrix.getCommandCount()
focal_class.full_signature: static int getCommandCount()
focal_class.identifier: getCommandCount
focal_class.modifiers: static
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getCommandCount()
focal_method.body: static int getCommandCount() {
          return currentCommand.get().size();
      }
focal_method.class_method_signature: Hystrix.getCommandCount()
focal_method.full_signature: static int getCommandCount()
focal_method.identifier: getCommandCount
focal_method.invocations: size get
focal_method.modifiers: static
focal_method.parameters: ()
focal_method.return: int
focal_method.signature: int getCommandCount()