Example usage for java.lang System clearProperty

List of usage examples for java.lang System clearProperty

Introduction

In this page you can find the example usage for java.lang System clearProperty.

Prototype

public static String clearProperty(String key) 

Source Link

Document

Removes the system property indicated by the specified key.

Usage

From source file:org.apache.solr.cloud.ZkCLITest.java

@AfterClass
public static void afterClass() throws InterruptedException {
    System.clearProperty("solrcloud.skip.autorecovery");
}

From source file:com.nesscomputing.config.SystemOverrideTest.java

@Test
public void testDynamicSystemConfiguration() {
    System.clearProperty("string-value");

    Assert.assertThat(new SystemConfiguration().getString("string-value"), is(nullValue()));
    Assert.assertThat(new SystemConfiguration().getString("string-value"), is(nullValue()));

    System.setProperty("string-value", "OVERRIDDEN");

    Assert.assertThat(new SystemConfiguration().getString("string-value"), is("OVERRIDDEN"));
    Assert.assertThat(new SystemConfiguration().getString("string-value"), is("OVERRIDDEN"));
}

From source file:org.mule.transport.file.FileMoveToFunctionalTestCase.java

@Override
public void doTearDown() throws MuleException {
    System.clearProperty(INPUT_DIRECTORY_PROPERTY);
    System.clearProperty(MOVE_TO_DIRECTORY_PROPERTY);
}

From source file:org.nuxeo.ecm.rating.RatingFeature.java

@Override
public void stop(FeaturesRunner runner) throws Exception {
    FileUtils.deleteQuietly(dir);//  ww  w  .  j  a v  a2s  . c om
    dir = null;
    System.clearProperty(PROP_NAME);
    super.stop(runner);
}

From source file:com.netflix.genie.common.client.TestBaseGenieClient.java

/**
 * Setup variables that will be used constantly across tests.
 *//*from  w w  w . j  av a  2 s  .  co m*/
@BeforeClass
public static void setupClass() {
    //Make sure eureka is never set
    eurekaEnv = System.getProperty(BaseGenieClient.EUREKA_ENVIRONMENT_PROPERTY);
    if (eurekaEnv != null) {
        System.clearProperty(BaseGenieClient.EUREKA_ENVIRONMENT_PROPERTY);
    }
}

From source file:org.constretto.spring.factorybean.ConstrettoSingletonFactoryBeanTest.java

@Test
public void givenNoStageOnStartupWithDefaultThenDefaultBeanIsSelected() throws Exception {
    System.clearProperty(ASSEMBLY_KEY);
    EnvironmentService testBeanOverriddenDefaultPrefix = (EnvironmentService) applicationContext
            .getBean("testBeanOverriddenDefaultBean");
    assertEquals(DevelopmentTestBean.class, testBeanOverriddenDefaultPrefix.getClass());
}

From source file:org.apache.oodt.config.distributed.DistributedConfigurationPublisherTest.java

@After
public void tearDownTest() {
    System.clearProperty("org.apache.oodt.cas.cli.action.spring.config");
    System.clearProperty("org.apache.oodt.cas.cli.option.spring.config");
}

From source file:it.reply.orchestrator.config.specific.WebAppConfigurationAware.java

@AfterClass
public static void generalCleanup() {
    System.clearProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY);
}

From source file:org.springframework.cloud.dataflow.rest.client.DataflowTemplateTests.java

@After
public void shutdown() {
    System.clearProperty("sun.net.client.defaultConnectTimeout");
}

From source file:org.apache.solr.core.TestCoreContainer.java

@AfterClass
public static void afterClass() {
    if (oldSolrHome != null) {
        System.setProperty(SOLR_HOME_PROP, oldSolrHome);
    } else {/* w w w . ja v a2  s  .c  om*/
        System.clearProperty(SOLR_HOME_PROP);
    }
}