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:de.hybris.platform.licence.sap.HybrisAdminTest.java

@After
public void tearDown() throws Exception {
    restoreHardwareKey(hwKeyBackup);// ww  w .  j  a  v a  2 s .  c om
    System.clearProperty("persistence.impl");
    persistence.removePersistenceFile();
}

From source file:org.apache.kylin.common.util.HiveCmdBuilderTest.java

@After
public void after() throws Exception {
    System.clearProperty("kylin.source.hive.client");
    System.clearProperty("kylin.source.hive.beeline-params");
}

From source file:com.facebook.config.TestSystemPropOverridingJSONProvider.java

@AfterMethod(alwaysRun = true)
public void tearDown() throws Exception {
    System.clearProperty(KEY1);
    System.clearProperty(KEY2);//w  ww  .j a va 2  s. c  om
    System.clearProperty(KEY3);
    System.clearProperty(KEY4);
}

From source file:hudson.plugins.blazemeter.ProxyConfigurator.java

public static void updateProxySettings(ProxyConfiguration proxyConfiguration, boolean isSlave)
        throws Exception {
    if (isSlave && "true".equals(System.getProperty(PROXY_OVERRIDE))) {
        LOGGER.info("Override proxy setting for slave");
        LOGGER.info("Use proxy host: " + System.getProperty(PROXY_HOST));
        LOGGER.info("Use proxy port: " + System.getProperty(PROXY_PORT));
        return;/*from  w ww .  j a  v a  2  s .c o  m*/
    }

    if (proxyConfiguration != null) {
        if (StringUtils.isNotBlank(proxyConfiguration.name)) {
            LOGGER.info("Use proxy host: " + proxyConfiguration.name);
            System.setProperty(PROXY_HOST, proxyConfiguration.name);
        }

        if (StringUtils.isNotBlank(String.valueOf(proxyConfiguration.port))) {
            LOGGER.info("Use proxy port: " + proxyConfiguration.port);
            System.setProperty(PROXY_PORT, String.valueOf(proxyConfiguration.port));
        }

        if (StringUtils.isNotBlank(proxyConfiguration.getUserName())) {
            System.setProperty(PROXY_USER, proxyConfiguration.getUserName());
        }

        if (StringUtils.isNotBlank(proxyConfiguration.getPassword())) {
            System.setProperty(PROXY_PASS, proxyConfiguration.getPassword());
        }
    } else {
        LOGGER.info("Clear proxy configs");
        System.clearProperty(PROXY_HOST);
        System.clearProperty(PROXY_PORT);
        System.clearProperty(PROXY_USER);
        System.clearProperty(PROXY_PASS);
    }
}

From source file:com.xebialabs.overcast.OvercastPropertiesTest.java

@After
public void teardown() {
    System.clearProperty("overcast.conf.file");
}

From source file:de.hashcode.simpleconf.PropertyLoaderTest.java

@Before
public void clearPropertiesUnderTest() {
    System.clearProperty("foo");
    System.clearProperty("foobar");
}

From source file:org.apache.zeppelin.interpreter.launcher.FlinkInterpreterLauncherTest.java

@Before
public void setUp() {
    for (final ZeppelinConfiguration.ConfVars confVar : ZeppelinConfiguration.ConfVars.values()) {
        System.clearProperty(confVar.getVarName());
    }//  www  . j a va2 s .co m
}

From source file:org.kie.server.services.impl.KieServerStateTest.java

@After
public void cleanup() {
    System.clearProperty(KieServerConstants.CFG_PERSISTANCE_DIALECT);
    System.clearProperty(KieServerConstants.CFG_PERSISTANCE_DS);
    System.clearProperty(KieServerConstants.CFG_PERSISTANCE_TM);
}

From source file:controllers.utils.NinjaTest.java

@After
public void shutdownServer() {
    System.clearProperty(NinjaConstant.MODE_KEY_NAME);
    ninjaTestServer.shutdown();
}

From source file:io.pivotal.cla.test.context.SystemActiveProfilesResolverTests.java

@Test
public void valueWithSystemProperty() {
    String value = "foo";
    System.setProperty(ValueWithSystemProperty.NAME, value);
    assertThat(resolver.resolve(ValueWithSystemProperty.class)).containsOnly(value);
    System.clearProperty(ValueWithSystemProperty.NAME);
}