@After public void tearDown() throws Exception { ConfigurationManager.getConfigInstance().clear(); }
@After public void cleanUp() { // Tests which use ConfigurationManager.getConfigInstance() will leave the singleton in an initialize state, // this will leave the singleton in a reasonable state between tests. ConfigurationManager.getConfigInstance().clear(); }
@After public void cleanup() { ConfigurationManager.getConfigInstance().clear(); }
@After public void cleanup() { ConfigurationManager.getConfigInstance().clear(); }
@After public void cleanup() { // force properties to be clean as well ConfigurationManager.getConfigInstance().clear(); HystrixCommandKey key = Hystrix.getCurrentThreadExecutingCommand(); if (key != null) { System.out.println("WARNING: Hystrix.getCurrentThreadExecutingCommand() should be null but got: " + key + ". Can occur when calling queue() and never retrieving."); } }
@After public void tearDown() { if (injector != null) { injector.shutdown(); } ConfigurationManager.getConfigInstance().clear(); }
@After public void tearDown() { if (injector != null) { injector.shutdown(); } ConfigurationManager.getConfigInstance().clear(); }
@After public void tearDown() throws Exception { client.shutdown(); ConfigurationManager.getConfigInstance().clear(); }
@After public void cleanup() { shutdownContextIfExists(); // force properties to be clean as well ConfigurationManager.getConfigInstance().clear(); }
@After public void cleanup() { ConfigurationManager.getConfigInstance().clear();
@After public void tearDown() throws Exception { client.shutdown(); mockLocalEurekaServer.stop(); ConfigurationManager.getConfigInstance().clear(); }
public void teardown() { Hystrix.reset(1, TimeUnit.SECONDS); ConfigurationManager.getConfigInstance().clear(); }
@Before public void beforeMethod() { clearSystemProps(); System.setProperty(MainClassUtils.DELAY_CRASH_ON_STARTUP_SYSTEM_PROP_KEY, "false"); ConfigurationManager.getConfigInstance().clear(); }
@Test public void testPrimary() { HystrixRequestContext context = HystrixRequestContext.initializeContext(); try { ConfigurationManager.getConfigInstance().setProperty("primarySecondary.usePrimary", true); assertEquals("responseFromPrimary-20", new CommandFacadeWithPrimarySecondary(20).execute()); } finally { context.shutdown(); ConfigurationManager.getConfigInstance().clear(); } }
@Test public void testSecondary() { HystrixRequestContext context = HystrixRequestContext.initializeContext(); try { ConfigurationManager.getConfigInstance().setProperty("primarySecondary.usePrimary", false); assertEquals("responseFromSecondary-20", new CommandFacadeWithPrimarySecondary(20).execute()); } finally { context.shutdown(); ConfigurationManager.getConfigInstance().clear(); } } }