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.geogig.geoserver.functional.GeoServerTestSupport.java

public void shutDownUpGeoServer() throws Exception {
    doTearDownClass();/* w w w. j av  a 2 s .c  o m*/
    // undo the changes made for this suite and reset
    System.clearProperty("org.geotools.referencing.forceXY");
    Hints.removeSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER);
    Hints.removeSystemDefault(Hints.FORCE_AXIS_ORDER_HONORING);
    CRS.reset("all");
}

From source file:org.jbpm.designer.server.service.DefaultDesignerAssetServiceTest.java

@AfterClass
public static void cleanOnce() {
    System.clearProperty("org.uberfire.nio.git.daemon.enabled");
    System.clearProperty("org.uberfire.nio.git.ssh.enabled");
}

From source file:org.apache.solr.client.solrj.TestBackupLBHttpSolrClient.java

@AfterClass
public static void afterClass() {
    if (savedFactory == null) {
        System.clearProperty("solr.directoryFactory");
    } else {/*from w ww . j a va 2 s .c  om*/
        System.setProperty("solr.directoryFactory", savedFactory);
    }
}

From source file:fr.in2p3.cc.storage.treqs.persistence.db2.DB2ConfigurationDAOTest.java

/**
 * Destroys all after tests./*from ww  w  .ja va 2  s .  c  om*/
 */
@AfterClass
public static void oneTimeTearDown() {
    DB2TestBroker.destroyInstance();
    AbstractDAOFactory.destroyInstance();
    Configurator.destroyInstance();
    System.clearProperty(Constants.CONFIGURATION_FILE);
}

From source file:org.alfresco.bm.tools.BMTestRunnerTest.java

/**
 * Prevent interference when running all tests in random order
 *//* w w  w.ja v a 2  s .  c  o m*/
@After
public void resetSystemProperties() throws Exception {
    System.clearProperty(PROP_APP_RELEASE);
    System.clearProperty(PROP_APP_SCHEMA);
    System.clearProperty(PROP_TEST_RUN_MONITOR_PERIOD);
}

From source file:org.apache.solr.rest.schema.analysis.TestManagedSynonymFilterFactory.java

@After
private void after() throws Exception {
    jetty.stop();/*from   w ww .j a v a  2 s  .  c  o m*/
    jetty = null;
    FileUtils.deleteDirectory(tmpSolrHome);
    System.clearProperty("managed.schema.mutable");
    System.clearProperty("enable.update.log");

    if (restTestHarness != null) {
        restTestHarness.close();
    }
    restTestHarness = null;
}

From source file:fr.in2p3.cc.storage.treqs.persistence.mysql.MySQLConfigurationDAOTest.java

/**
 * Destroys all after tests./*from w ww  .ja v a2  s . c o m*/
 */
@AfterClass
public static void oneTimeTearDown() {
    MySQLBroker.destroyInstance();
    AbstractDAOFactory.destroyInstance();
    Configurator.destroyInstance();
    System.clearProperty(Constants.CONFIGURATION_FILE);
}

From source file:org.cloudfoundry.identity.uaa.config.YamlServletProfileInitializerTests.java

@After
public void cleanup() throws Exception {
    System.clearProperty("APPLICATION_CONFIG_URL");
    System.clearProperty("LOG_FILE");
    System.clearProperty("LOG_PATH");
    Log4jConfigurer.initLogging("classpath:log4j.properties");
    if (activeProfiles != null) {
        System.setProperty("spring.profiles.active", activeProfiles);
    } else {/*from w w  w  .  java 2  s. c o m*/
        System.clearProperty("spring.profiles.active");
    }
}

From source file:org.apache.juddi.keygen.KeyGeneratorTest.java

@Test()
public void testGeneratorInterface() {
    System.setProperty(Property.JUDDI_KEYGENERATOR, "org.apache.juddi.keygen.KeyGenerator");
    try {//from  w ww. j av a2  s.  c  o m
        KeyGenerator keyGenerator = KeyGeneratorFactory.forceNewKeyGenerator();
        System.out.println("Generator = " + keyGenerator.getClass());
        Assert.fail("This should have thrown an exception because you cannot instantiate an interface.");
    } catch (Exception e) {
        String message = e.getMessage();
        Assert.assertEquals(
                "The specified Key Generator class 'org.apache.juddi.keygen.KeyGenerator' cannot be instantiated.",
                message);
    }
    System.clearProperty(Property.JUDDI_KEYGENERATOR);
}

From source file:com.autonomy.aci.client.services.impl.DocumentProcessorTest.java

@Test(expected = FactoryConfigurationError.class)
public void testConvertACIResponseToDOMInvalidDocumentBuilderFactory()
        throws AciErrorException, IOException, ProcessorException {
    // Set a duff property for the DocumentBuilderFactory...
    System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "com.autonomy.DuffDocumentBuilderFactory");

    try {//from   ww  w .  j  ava  2 s. c  o m
        // Setup with a proper XML response file...
        final BasicHttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
        response.setEntity(new InputStreamEntity(getClass().getResourceAsStream("/GetVersion.xml"), -1));

        // Set the AciResponseInputStream...
        final AciResponseInputStream stream = new AciResponseInputStreamImpl(response);

        // Process...
        processor.process(stream);
        fail("Should have raised an ProcessorException.");
    } finally {
        // Remove the duff system property...
        System.clearProperty("javax.xml.parsers.DocumentBuilderFactory");
    }
}