diff --git a/build.sbt b/build.sbt index 5a0fdbf..bb7a329 100644 --- a/build.sbt +++ b/build.sbt @@ -152,6 +152,22 @@ lazy val test = project .disablePlugins(plugins.JUnitXmlReportPlugin) .dependsOn(core, persist, rep) +lazy val test_examples = project + .in(file("stasis-test-examples")) + .settings( + moduleName := "stasis-test-examples", + assemblyJarName.in(assembly) := "stasis-test-examples.jar", + Test / javacOptions := Seq( + "-Xlint:deprecation", + "-Xlint:unchecked" + ), + libraryDependencies ++= Seq( + "junit" % "junit" % "4.12" % Test, + "com.novocode" % "junit-interface" % "0.11" % Test + ) + ) + .dependsOn(core, persist, rep, test) + val V = "\\d+\\.\\d+\\.\\d+" val ReleaseCandidate = s"($V-RC\\d+).*".r val Milestone = s"($V-M\\d+).*".r diff --git a/stasis-test/src/test/resources/com/sleepycat/collections/test/serial/TestSerial.java.original b/stasis-test-examples/src/test/java/com/sleepycat/collections/test/serial/TestSerial.java similarity index 100% rename from stasis-test/src/test/resources/com/sleepycat/collections/test/serial/TestSerial.java.original rename to stasis-test-examples/src/test/java/com/sleepycat/collections/test/serial/TestSerial.java diff --git a/stasis-test/src/test/resources/com/sleepycat/je/LoadedClassImpl.java.original b/stasis-test-examples/src/test/java/com/sleepycat/je/LoadedClassImpl.java similarity index 100% rename from stasis-test/src/test/resources/com/sleepycat/je/LoadedClassImpl.java.original rename to stasis-test-examples/src/test/java/com/sleepycat/je/LoadedClassImpl.java diff --git a/stasis-test/src/test/resources/com/sleepycat/persist/test/EvolveClasses.java.original b/stasis-test-examples/src/test/java/com/sleepycat/persist/test/EvolveClasses.java similarity index 100% rename from stasis-test/src/test/resources/com/sleepycat/persist/test/EvolveClasses.java.original rename to stasis-test-examples/src/test/java/com/sleepycat/persist/test/EvolveClasses.java diff --git a/stasis-test/src/test/java/com/sleepycat/collections/test/serial/StoredClassCatalogTest.java b/stasis-test/src/test/java/com/sleepycat/collections/test/serial/StoredClassCatalogTest.java index 90cdff8..32632a6 100644 --- a/stasis-test/src/test/java/com/sleepycat/collections/test/serial/StoredClassCatalogTest.java +++ b/stasis-test/src/test/java/com/sleepycat/collections/test/serial/StoredClassCatalogTest.java @@ -52,7 +52,6 @@ import com.sleepycat.util.test.TestEnv; * * @author Mark Hayes */ -@Ignore @RunWith(Parameterized.class) public class StoredClassCatalogTest extends TestBase implements TransactionWorker { @@ -158,7 +157,8 @@ public class StoredClassCatalogTest extends TestBase runner = null; } } - + + @Ignore @Test public void runTest() throws Exception { diff --git a/stasis-test/src/test/java/com/sleepycat/collections/test/serial/StoredClassCatalogTestInit.java b/stasis-test/src/test/java/com/sleepycat/collections/test/serial/StoredClassCatalogTestInit.java index 1897763..a70e6fb 100644 --- a/stasis-test/src/test/java/com/sleepycat/collections/test/serial/StoredClassCatalogTestInit.java +++ b/stasis-test/src/test/java/com/sleepycat/collections/test/serial/StoredClassCatalogTestInit.java @@ -50,7 +50,6 @@ import com.sleepycat.util.test.TestEnv; * * @author Mark Hayes */ -@Ignore @RunWith(Parameterized.class) public class StoredClassCatalogTestInit extends TestBase implements TransactionWorker { @@ -146,6 +145,7 @@ public class StoredClassCatalogTestInit extends TestBase } } + @Ignore @Test public void runTest() throws Exception { diff --git a/stasis-test/src/test/java/com/sleepycat/je/ClassLoaderTest.java b/stasis-test/src/test/java/com/sleepycat/je/ClassLoaderTest.java index 4881838..1f3660c 100644 --- a/stasis-test/src/test/java/com/sleepycat/je/ClassLoaderTest.java +++ b/stasis-test/src/test/java/com/sleepycat/je/ClassLoaderTest.java @@ -20,7 +20,6 @@ import java.io.File; import java.util.Comparator; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import com.sleepycat.bind.serial.SerialBinding; @@ -36,7 +35,6 @@ import com.sleepycat.util.test.SharedTestUtils; /** * Tests the Environment ClassLoader property. */ -@Ignore public class ClassLoaderTest extends DualTestCase { public interface LoadedClass { @@ -72,7 +70,8 @@ public class ClassLoaderTest extends DualTestCase { String classLoaderPath = System.getProperty("testclassloader"); if (classLoaderPath == null) { - classLoaderPath = SharedTestUtils.getTestDir().getParent() + File.separator + "classloader"; + String cwd = new java.io.File( "." ).getCanonicalFile().getParent(); + classLoaderPath = cwd + "/stasis-test-examples/target/scala-2.12/test-classes"; } File classLoaderFile = new File(classLoaderPath); if (!(classLoaderFile.exists() && classLoaderFile.isDirectory())) {