mirror of https://github.com/apache/lucene.git
SOLR-14096: Stopping -Denable.packages=true from leaking to other tests
This commit is contained in:
parent
83800c03df
commit
ee0b066ab6
|
@ -47,6 +47,8 @@ import org.apache.solr.common.util.Utils;
|
|||
import org.apache.solr.util.LogLevel;
|
||||
import org.apache.zookeeper.CreateMode;
|
||||
import org.apache.zookeeper.server.ByteBufferInputStream;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
|
||||
import static org.apache.solr.common.util.Utils.JAVABINCONSUMER;
|
||||
import static org.apache.solr.core.TestDynamicLoading.getFileContent;
|
||||
|
@ -54,8 +56,17 @@ import static org.apache.solr.core.TestDynamicLoading.getFileContent;
|
|||
@LogLevel("org.apache.solr.filestore.PackageStoreAPI=DEBUG;org.apache.solr.filestore.DistribPackageStore=DEBUG")
|
||||
public class TestDistribPackageStore extends SolrCloudTestCase {
|
||||
|
||||
public void testPackageStoreManagement() throws Exception {
|
||||
@Before
|
||||
public void setup() {
|
||||
System.setProperty("enable.packages", "true");
|
||||
}
|
||||
|
||||
@After
|
||||
public void teardown() {
|
||||
System.clearProperty("enable.packages");
|
||||
}
|
||||
|
||||
public void testPackageStoreManagement() throws Exception {
|
||||
MiniSolrCloudCluster cluster =
|
||||
configureCluster(4)
|
||||
.withJettyConfig(jetty -> jetty.enableV2(true))
|
||||
|
|
|
@ -54,6 +54,8 @@ import org.apache.solr.filestore.TestDistribPackageStore;
|
|||
import org.apache.solr.util.LogLevel;
|
||||
import org.apache.zookeeper.CreateMode;
|
||||
import org.apache.zookeeper.data.Stat;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.apache.solr.common.cloud.ZkStateReader.SOLR_PKGS_PATH;
|
||||
|
@ -67,9 +69,18 @@ import static org.apache.solr.filestore.TestDistribPackageStore.waitForAllNodesH
|
|||
//@org.apache.lucene.util.LuceneTestCase.AwaitsFix(bugUrl="https://issues.apache.org/jira/browse/SOLR-13822") // leaks files
|
||||
public class TestPackages extends SolrCloudTestCase {
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
System.setProperty("enable.packages", "true");
|
||||
}
|
||||
|
||||
@After
|
||||
public void teardown() {
|
||||
System.clearProperty("enable.packages");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPluginLoading() throws Exception {
|
||||
System.setProperty("enable.packages", "true");
|
||||
MiniSolrCloudCluster cluster =
|
||||
configureCluster(4)
|
||||
.withJettyConfig(jetty -> jetty.enableV2(true))
|
||||
|
|
Loading…
Reference in New Issue