List of usage examples for java.lang System clearProperty
public static String clearProperty(String key)
From source file:org.apache.atlas.web.filters.AtlasAuthenticationSimpleFilterTest.java
@Test(enabled = false) public void testSimpleLogin() throws Exception { String originalConf = System.getProperty("atlas.conf"); System.setProperty("atlas.conf", System.getProperty("user.dir")); generateSimpleLoginConfiguration();//from ww w .j ava2 s.co m TestEmbeddedServer server = new TestEmbeddedServer(23001, "webapp/target/apache-atlas"); try { startEmbeddedServer(server.getServer()); URL url = new URL("http://localhost:23001"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.connect(); assertEquals(connection.getResponseCode(), Response.Status.BAD_REQUEST.getStatusCode()); url = new URL("http://localhost:23001/?user.name=testuser"); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.connect(); assertEquals(connection.getResponseCode(), Response.Status.OK.getStatusCode()); assertEquals(RequestContext.get().getUser(), TESTUSER); } finally { server.getServer().stop(); if (originalConf != null) { System.setProperty("atlas.conf", originalConf); } else { System.clearProperty("atlas.conf"); } } }
From source file:com.streamsets.pipeline.kafka.impl.TestSaslEnabledKafka.java
@AfterClass public static void afterClass() { TestSecureKafkaBase.afterClass();/*from w ww. j a va 2 s . co m*/ if (miniKdc != null) { miniKdc.stop(); miniKdc = null; } System.clearProperty(JAVA_SECURITY_AUTH_LOGIN_CONFIG); Configuration.setConfiguration(null); if (jaasConfigFile.exists()) { jaasConfigFile.delete(); } if (keytabFile.exists()) { keytabFile.delete(); } }
From source file:org.eclipse.ecr.runtime.AbstractRuntimeService.java
protected AbstractRuntimeService(DefaultRuntimeContext context, Map<String, String> properties) { this.context = context; context.setRuntime(this); if (properties != null) { this.properties.putAll(properties); }/* w w w . ja v a2s . c o m*/ // get errors set by NuxeoDeployer String errs = System.getProperty("org.eclipse.ecr.runtime.deployment.errors"); if (errs != null) { warnings.addAll(Arrays.asList(errs.split("\n"))); System.clearProperty("org.eclipse.ecr.runtime.deployment.errors"); } }
From source file:hudson.plugins.timestamper.TimestamperBuildWrapperTest.java
/** */ @After public void tearDown() { System.clearProperty(TimestampNote.getSystemProperty()); }
From source file:com.cloudera.cdk.morphline.solr.AbstractSolrMorphlineZkTest.java
@Override @After/* w w w.j a va 2s. com*/ public void tearDown() throws Exception { super.tearDown(); System.clearProperty("host"); System.clearProperty("numShards"); }
From source file:org.cloudfoundry.identity.uaa.BootstrapTests.java
@After public void cleanup() throws Exception { System.clearProperty("spring.profiles.active"); System.clearProperty("CLOUD_FOUNDRY_CONFIG_PATH"); System.clearProperty("UAA_CONFIG_FILE"); if (context != null) { if (context.containsBean("scimEndpoints")) { TestUtils.deleteFrom(context.getBean("dataSource", DataSource.class), "sec_audit"); }//from w w w. java 2s . c o m context.getBean(Flyway.class).clean(); context.close(); } }
From source file:org.kie.server.remote.rest.common.resource.KieServerRestImplTest.java
@After public void cleanUp() { if (kieServer != null) { kieServer.destroy();/*from w w w . ja v a 2 s .com*/ } KieServerEnvironment.setServerId(origServerId); System.clearProperty(KieServerConstants.KIE_SERVER_MGMT_API_DISABLED); }
From source file:org.apache.solr.cloud.TestSolrCloudWithDelegationTokens.java
@AfterClass public static void shutdown() throws Exception { if (miniCluster != null) { miniCluster.shutdown();//from w w w . ja va 2 s . c om } miniCluster = null; solrClientPrimary.close(); solrClientPrimary = null; solrClientSecondary.close(); solrClientSecondary = null; System.clearProperty("authenticationPlugin"); System.clearProperty(KerberosPlugin.DELEGATION_TOKEN_ENABLED); System.clearProperty("solr.kerberos.cookie.domain"); }
From source file:org.apache.juddi.api.impl.API_040_BusinessServiceLoadTest.java
@AfterClass public static void shutdown() throws ConfigurationException { tckTModel.deleteCreatedTModels(authInfoJoe); Registry.stop();// ww w . ja v a 2 s . co m System.clearProperty(JUDDI_CONFIGURATION_FILE_SYSTEM_PROPERTY); }
From source file:org.cloudfoundry.identity.uaa.login.BootstrapTests.java
@After public void cleanup() throws Exception { System.clearProperty("spring.profiles.active"); if (context != null) { context.close();//from w w w . j a va2s .c om } Set<String> removeme = new HashSet<>(); for (Map.Entry<Object, Object> entry : System.getProperties().entrySet()) { if (entry.getKey().toString().startsWith("login.")) { removeme.add(entry.getKey().toString()); } } for (String s : removeme) { System.clearProperty(s); } }