Test is in wrong package
Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/9c097819 Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/9c097819 Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/9c097819 Branch: refs/heads/develop Commit: 9c097819e00c44bb99d545faf5b79e1f528b7771 Parents: 8296fdd Author: niclas <[email protected]> Authored: Sat Mar 18 11:09:23 2017 +0800 Committer: niclas <[email protected]> Committed: Sat Mar 18 11:09:23 2017 +0800 ---------------------------------------------------------------------- .../entitystore/PreferencesEntityStoreTest.java | 56 -------------------- .../preferences/PreferencesEntityStoreTest.java | 56 ++++++++++++++++++++ .../polygene/test/internal/DockerRule.java | 3 +- 3 files changed, 58 insertions(+), 57 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/polygene-java/blob/9c097819/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/PreferencesEntityStoreTest.java ---------------------------------------------------------------------- diff --git a/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/PreferencesEntityStoreTest.java b/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/PreferencesEntityStoreTest.java deleted file mode 100644 index 10be81e..0000000 --- a/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/PreferencesEntityStoreTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ -package org.apache.polygene.entitystore; - -import java.util.prefs.Preferences; -import org.apache.polygene.bootstrap.AssemblyException; -import org.apache.polygene.bootstrap.ModuleAssembly; -import org.apache.polygene.entitystore.preferences.PreferencesEntityStoreInfo; -import org.apache.polygene.entitystore.preferences.PreferencesEntityStoreService; -import org.apache.polygene.test.entity.AbstractEntityStoreTest; -import org.apache.polygene.valueserialization.orgjson.OrgJsonValueSerializationAssembler; -import org.junit.Rule; -import org.junit.rules.TemporaryFolder; - -public class PreferencesEntityStoreTest - extends AbstractEntityStoreTest -{ - @Rule - public TemporaryFolder tmpDir = new TemporaryFolder(); - - @Override - public void assemble( ModuleAssembly module ) - throws AssemblyException - { - module.layer().application().setName( "PreferencesTest" ); - - super.assemble( module ); - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - Thread.currentThread().setContextClassLoader( null ); - Preferences node = Preferences.userNodeForPackage( getClass() ) - .node( "integtest" ) - .node( tmpDir.getRoot().getName() ) - .node( "PreferencesEntityStoreTest" ); - PreferencesEntityStoreInfo metaInfo = new PreferencesEntityStoreInfo( node ); - Thread.currentThread().setContextClassLoader( cl ); - module.services( PreferencesEntityStoreService.class ).setMetaInfo( metaInfo ).instantiateOnStartup(); - new OrgJsonValueSerializationAssembler().assemble( module ); - } -} http://git-wip-us.apache.org/repos/asf/polygene-java/blob/9c097819/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTest.java ---------------------------------------------------------------------- diff --git a/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTest.java b/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTest.java new file mode 100644 index 0000000..0f52e46 --- /dev/null +++ b/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTest.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ +package org.apache.polygene.entitystore.preferences; + +import java.util.prefs.Preferences; +import org.apache.polygene.bootstrap.AssemblyException; +import org.apache.polygene.bootstrap.ModuleAssembly; +import org.apache.polygene.entitystore.preferences.PreferencesEntityStoreInfo; +import org.apache.polygene.entitystore.preferences.PreferencesEntityStoreService; +import org.apache.polygene.test.entity.AbstractEntityStoreTest; +import org.apache.polygene.valueserialization.orgjson.OrgJsonValueSerializationAssembler; +import org.junit.Rule; +import org.junit.rules.TemporaryFolder; + +public class PreferencesEntityStoreTest + extends AbstractEntityStoreTest +{ + @Rule + public TemporaryFolder tmpDir = new TemporaryFolder(); + + @Override + public void assemble( ModuleAssembly module ) + throws AssemblyException + { + module.layer().application().setName( "PreferencesTest" ); + + super.assemble( module ); + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + Thread.currentThread().setContextClassLoader( null ); + Preferences node = Preferences.userNodeForPackage( getClass() ) + .node( "integtest" ) + .node( tmpDir.getRoot().getName() ) + .node( "PreferencesEntityStoreTest" ); + PreferencesEntityStoreInfo metaInfo = new PreferencesEntityStoreInfo( node ); + Thread.currentThread().setContextClassLoader( cl ); + module.services( PreferencesEntityStoreService.class ).setMetaInfo( metaInfo ).instantiateOnStartup(); + new OrgJsonValueSerializationAssembler().assemble( module ); + } +} http://git-wip-us.apache.org/repos/asf/polygene-java/blob/9c097819/internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/DockerRule.java ---------------------------------------------------------------------- diff --git a/internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/DockerRule.java b/internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/DockerRule.java index dce7150..1e228a5 100644 --- a/internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/DockerRule.java +++ b/internals/testsupport-internal/src/main/java/org/apache/polygene/test/internal/DockerRule.java @@ -27,7 +27,8 @@ import pl.domzal.junit.docker.rule.WaitFor; import static org.junit.Assume.assumeFalse; -public class DockerRule implements TestRule +public class DockerRule + implements TestRule { private final boolean dockerDisabled = Boolean.valueOf( System.getProperty( "DOCKER_DISABLED", "false" ) ); private final pl.domzal.junit.docker.rule.DockerRule dockerRule;
