peculater closed pull request #12: Get the tests passing before 2018 ends. URL: https://github.com/apache/incubator-tamaya-sandbox/pull/12
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/pom.xml b/pom.xml index ed71cb9..e58870c 100644 --- a/pom.xml +++ b/pom.xml @@ -637,10 +637,10 @@ under the License. <plugins> - <plugin> + <plugin> <groupId>org.apache.karaf.tooling</groupId> <artifactId>karaf-maven-plugin</artifactId> - <version>4.2.0</version> + <version>4.2.2</version> <extensions>true</extensions> <executions> <execution> @@ -652,6 +652,9 @@ under the License. <configuration> <startLevel>80</startLevel> <aggregateFeatures>true</aggregateFeatures> + <excludedArtifactIds> + <excludedArtifactId>tamaya-doc_alpha</excludedArtifactId> + </excludedArtifactIds> </configuration> </execution> </executions> diff --git a/vertx/src/test/java/org/apache/tamaya/vertx/ConfigVerticleTest.java b/vertx/src/test/java/org/apache/tamaya/vertx/ConfigVerticleTest.java index 38e5e2e..e668c5b 100644 --- a/vertx/src/test/java/org/apache/tamaya/vertx/ConfigVerticleTest.java +++ b/vertx/src/test/java/org/apache/tamaya/vertx/ConfigVerticleTest.java @@ -40,8 +40,8 @@ import java.util.Set; /** - * Tests the Tamaya Vertx configuration support. - * Created by atsticks on 08.03.17. + * Tests the Tamaya Vertx configuration support. Created by atsticks on + * 08.03.17. */ @RunWith(VertxUnitRunner.class) public class ConfigVerticleTest { @@ -52,39 +52,46 @@ private TamayaConfigurationProducer producerVerticle = new TamayaConfigurationProducer(); @Before - public void prepare(){ - vertxContext.vertx().deployVerticle(producerVerticle); + public void prepare(final TestContext testContext) { + final Async deployAsync = testContext.async(); + vertxContext.vertx().deployVerticle(producerVerticle, res -> { + if (!res.succeeded()) { + testContext.fail(); + } + deployAsync.complete(); + }); } @Test - public void testSingle(final TestContext testContext){ + + public void testSingle(final TestContext testContext) { final Async async = testContext.async(); vertxContext.vertx().eventBus().send(TamayaConfigurationProducer.DEFAULT_CONFIG_GET_SINGLE_ADDRESS, "user.home", new Handler<AsyncResult<Message<String>>>() { - @Override - public void handle(AsyncResult<Message<String>> reply) { - testContext.assertEquals( - reply.result().body(), - System.getProperty("user.home")); - async.complete(); - } - }); + @Override + public void handle(AsyncResult<Message<String>> reply) { + testContext.assertEquals( + reply.result().body(), + System.getProperty("user.home")); + async.complete(); + } + }); } @Test - public void testMap(final TestContext testContext){ + public void testMap(final TestContext testContext) { final Async async = testContext.async(); String selector = "[]{\"user.*\"}"; vertxContext.vertx().eventBus().send(TamayaConfigurationProducer.DEFAULT_CONFIG_GET_MULTI_ADDRESS, selector, reply -> { testContext.assertNotNull(reply.result()); testContext.assertNotNull(reply.result().body()); - Map<String,String> config = Json.decodeValue((String)reply.result().body(), + Map<String, String> config = Json.decodeValue((String) reply.result().body(), Map.class); - Map<String,String> compareTo = Configuration.current() - .map(ConfigurationFunctions.filter((k,v) -> k.matches("user."))).getProperties(); + Map<String, String> compareTo = Configuration.current() + .map(ConfigurationFunctions.filter((k, v) -> k.matches("user."))).getProperties(); testContext.assertEquals(config.size(), compareTo.size()); - for(Map.Entry<String,String> en:compareTo.entrySet()){ + for (Map.Entry<String, String> en : compareTo.entrySet()) { testContext.assertEquals( config.get(en.getKey()), en.getValue()); } @@ -93,7 +100,7 @@ public void testMap(final TestContext testContext){ } @Test - public void testConfigCalls(TestContext testContext){ + public void testConfigCalls(TestContext testContext) { testContext.assertNotNull(producerVerticle.getConfiguration()); testContext.assertEquals( producerVerticle.getConfigValue("user.home"), ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services