List of usage examples for java.lang System clearProperty
public static String clearProperty(String key)
From source file:org.constretto.spring.factorybean.ConstrettoSingletonFactoryBeanTest.java
@After public void cleanup() throws Exception { System.clearProperty(ASSEMBLY_KEY); }
From source file:com.talis.inject.guice.PropertiesConfiguredModuleFactoryTest.java
@Test public void returnEmptyListIfModulesSpecifiedInFile() throws Exception { File tmpFile = File.createTempFile("injector-module", ".properties"); tmpFile.deleteOnExit();/*from www . j a va2s.c o m*/ FileUtils.writeStringToFile(tmpFile, "some.other.property=SomeRandomValue"); System.clearProperty(PropertiesConfiguredModuleFactory.PROPERTIES_LOCATION_PROP); try { System.setProperty(PropertiesConfiguredModuleFactory.PROPERTIES_LOCATION_PROP, tmpFile.getAbsolutePath()); Module[] modules = new PropertiesConfiguredModuleFactory().getModules(); assertEquals(0, modules.length); } finally { System.clearProperty(PropertiesConfiguredModuleFactory.PROPERTIES_LOCATION_PROP); } }
From source file:org.kie.workbench.common.services.backend.maven.plugins.dependency.BuildInMemoryClasspathMojoTest.java
@AfterClass public static void tearDown() { System.clearProperty("org.uberfire.nio.git.daemon.enabled"); System.clearProperty("org.uberfire.nio.git.ssh.enabled"); if (tmpRoot != null) { rm(tmpRoot.toFile());//from w w w . j a v a2 s .c o m } }
From source file:hudson.remoting.DefaultClassFilterTest.java
public static void setOverrideProperty(String value) throws Exception { if (value == null) { System.clearProperty(hudson.remoting.ClassFilter.FILE_OVERRIDE_LOCATION_PROPERTY); } else {//w ww .j av a 2 s.c o m System.setProperty(hudson.remoting.ClassFilter.FILE_OVERRIDE_LOCATION_PROPERTY, value); } }
From source file:org.kitesdk.data.oozie.TestKiteURIHandler.java
@After public void removeDataPath() throws IOException { fs.delete(new Path("target/data"), true); // restore configuration DefaultConfiguration.set(startingConf); if (serviceTempDir != null) { FileUtils.deleteDirectory(serviceTempDir); serviceTempDir = null;/*from w w w .j a v a2s.c o m*/ } if (Services.get() != null) { Services.get().destroy(); } if (startingOozieHome == null) { System.clearProperty("oozie.home.dir"); } else { System.setProperty("oozie.home.dir", startingOozieHome); startingOozieHome = null; } }
From source file:org.apache.hadoop.hbase.client.rsgroup.TestShellRSGroups.java
@Test public void testRunShellTests() throws IOException { try {/*from ww w . ja v a 2s. c om*/ // Start only GroupShellTest System.setProperty("shell.test", "Hbase::RSGroupShellTest"); jruby.runScriptlet(PathType.ABSOLUTE, basePath + "/src/test/ruby/tests_runner.rb"); } finally { System.clearProperty("shell.test"); } }
From source file:com.streamsets.pipeline.stage.origin.hdfs.cluster.ClusterHDFSSourceIT.java
@AfterClass public static void cleanUpClass() throws IOException { System.clearProperty("sdc.resources.dir"); if (miniDFS != null) { miniDFS.shutdown();/*ww w .j av a2 s. co m*/ miniDFS = null; } }
From source file:org.codice.ddf.migration.util.MigratableUtilTest.java
@Test(expected = MigrationException.class) public void constructorWithDdfHomeNotSet() { System.clearProperty(DDF_HOME_PROPERTY_NAME); new MigratableUtil(); }
From source file:com.rackspacecloud.blueflood.inputs.handlers.HttpMetricsIngestionServerShutdownIntegrationTest.java
@AfterClass public static void shutdown() { Configuration.getInstance().setProperty(CoreConfig.EVENTS_MODULES.name(), ""); System.clearProperty(CoreConfig.EVENTS_MODULES.name()); if (esSetup != null) { esSetup.terminate();/*w w w.ja va 2 s .c o m*/ } if (vendor != null) { vendor.shutdown(); } }
From source file:org.artificer.repository.test.AbstractPersistenceTest.java
@AfterClass public static void cleanup() { System.clearProperty(ArtificerConstants.ARTIFICER_CONFIG_AUDITING); }