vert-x3 / vertx-config

Vert.x Configuration Service
Apache License 2.0
54 stars 64 forks source link

vertx-config-git tests fail #26

Closed gsson closed 6 years ago

gsson commented 6 years ago

Running mvn clean install locally makes some vertx-config-git fail.

Failing tests below; seems to be a case sensitivity thing, but the git log does not reveal any changes to the error messaging:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running io.vertx.config.git.GitConfigStoreTest
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Tests run: 24, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 9.654 sec <<< FAILURE! - in io.vertx.config.git.GitConfigStoreTest
testConfigurationUpdateWithMergeIssue_Edit(io.vertx.config.git.GitConfigStoreTest)  Time elapsed: 2.699 sec  <<< FAILURE!
java.lang.AssertionError: 
Expecting:
 <"Unable to rebase repository - Conflicts: [dir/a.json]">
to contain:
 <"conflict"> 
    at io.vertx.config.git.GitConfigStoreTest.lambda$testConfigurationUpdateWithMergeIssue_Edit$20(GitConfigStoreTest.java:565)

testConfigurationUpdateWithMergeIssue_Commit(io.vertx.config.git.GitConfigStoreTest)  Time elapsed: 0.401 sec  <<< FAILURE!
java.lang.AssertionError: 
Expecting:
 <"Unable to rebase repository - Conflicts: [dir/a.json]">
to contain:
 <"conflict"> 
    at io.vertx.config.git.GitConfigStoreTest.lambda$testConfigurationUpdateWithMergeIssue_Commit$17(GitConfigStoreTest.java:519)

Running io.vertx.config.git.GitConfigStoreWithGithubTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.504 sec - in io.vertx.config.git.GitConfigStoreWithGithubTest

Results :

Failed tests: 
  GitConfigStoreTest.lambda$testConfigurationUpdateWithMergeIssue_Commit$17:519 
Expecting:
 <"Unable to rebase repository - Conflicts: [dir/a.json]">
to contain:
 <"conflict"> 
  GitConfigStoreTest.lambda$testConfigurationUpdateWithMergeIssue_Edit$20:565 
Expecting:
 <"Unable to rebase repository - Conflicts: [dir/a.json]">
to contain:
 <"conflict"> 

Tests run: 26, Failures: 2, Errors: 0, Skipped: 0
gsson commented 6 years ago

This makes the failure go away, but I don't know that it's the right thing to do

index 515cfa2..83f410d 100644
--- a/vertx-config-git/src/test/java/io/vertx/config/git/GitConfigStoreTest.java
+++ b/vertx-config-git/src/test/java/io/vertx/config/git/GitConfigStoreTest.java
@@ -516,7 +516,7 @@ public class GitConfigStoreTest {
     Async async = tc.async();
     retriever.getConfig(ar -> {
       assertThat(ar.succeeded()).isFalse();
-      assertThat(ar.cause().getMessage()).contains("conflict");
+      assertThat(ar.cause().getMessage()).containsIgnoringCase("conflict");
       async.complete();
     });
   }
@@ -562,7 +562,7 @@ public class GitConfigStoreTest {
     Async async = tc.async();
     retriever.getConfig(ar -> {
       assertThat(ar.succeeded()).isFalse();
-      assertThat(ar.cause().getMessage()).contains("conflict");
+      assertThat(ar.cause().getMessage()).containsIgnoringCase("conflict");
       async.complete();
     });
   }
@@ -729,4 +729,4 @@ public class GitConfigStoreTest {
     return this;
   }