Skip to content

Commit

Permalink
Do not share the test store with all test modules
Browse files Browse the repository at this point in the history
  • Loading branch information
aaime committed Sep 12, 2024
1 parent 827c942 commit 23db9c4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.

This file was deleted.

15 changes: 15 additions & 0 deletions src/main/src/test/java/org/geoserver/catalog/ResourcePoolTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,10 @@
import org.geotools.util.factory.GeoTools;
import org.geotools.util.factory.Hints;
import org.hamcrest.Matchers;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.locationtech.jts.geom.Point;
Expand All @@ -154,6 +156,8 @@ public class ResourcePoolTest extends GeoServerSystemTestSupport {
private static final String HUMANS = "humans";

private static final String BAD_CONN_DATASTORE = "bad_conn_data_store";
public static final DataStoreFactorySpi TEST_DIRECTORY_STORE_FACTORY_SPI =
new TestDirectoryStoreFactorySpi();

static {
System.setProperty("ALLOW_ENV_PARAMETRIZATION", "true");
Expand All @@ -166,6 +170,17 @@ public class ResourcePoolTest extends GeoServerSystemTestSupport {

private static final String EXTERNAL_ENTITIES = "externalEntities";

@BeforeClass
public static void registerTestDirectoryStore() {
// a "catch-all" datastore that will use any File without requiring a filetype/dbtype
DataStoreFinder.registerFactrory(TEST_DIRECTORY_STORE_FACTORY_SPI);
}

@AfterClass
public static void deregisterTestDirectoryStore() {
DataStoreFinder.deregisterFactrory(TEST_DIRECTORY_STORE_FACTORY_SPI);
}

@Override
protected void onSetUp(SystemTestData testData) throws Exception {
super.onSetUp(testData);
Expand Down

0 comments on commit 23db9c4

Please sign in to comment.