@AfterClass public static void tearDownAfterClass() throws Exception { if (threadLocalBundleContext.get() != null) { CamelBlueprintHelper.disposeBundleContext(threadLocalBundleContext.get()); threadLocalBundleContext.remove(); } CamelTestSupport.tearDownAfterClass(); }
@After @Override public void tearDown() throws Exception { System.clearProperty("skipStartingCamelContext"); System.clearProperty("registerBlueprintCamelContextEager"); super.tearDown(); if (isCreateCamelContextPerClass()) { // we tear down in after class return; } // unregister services if (bundleContext != null) { for (ServiceRegistration<?> reg : services) { bundleContext.ungetService(reg.getReference()); } } CamelBlueprintHelper.disposeBundleContext(bundleContext); }