Fixed bug which returns incorrect version number on first request after remote repo is updated. Fixed circleci warnings.

This commit is contained in:
rlynch2
2016-10-24 21:50:33 -07:00
parent d5f4d8ed60
commit 9300bee308

View File

@@ -19,6 +19,7 @@ package org.springframework.cloud.config.server.environment;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
@@ -399,13 +400,13 @@ public class JGitEnvironmentRepositoryIntegrationTests {
String updatedRemoteVersion = remoteRef.getObjectId().getName();
//make sure our versions have been updated
Assert.assertEquals(updatedRemoteVersion, updatedLocalVersion);
Assert.assertNotEquals(updatedRemoteVersion, remoteVersion);
Assert.assertNotEquals(updatedLocalVersion, localVersion);
assertEquals(updatedRemoteVersion, updatedLocalVersion);
assertNotEquals(updatedRemoteVersion, remoteVersion);
assertNotEquals(updatedLocalVersion, localVersion);
//make sure our environment also reflects the updated version
//this used to have a bug
Assert.assertEquals(environment.getVersion(), updatedRemoteVersion);
assertEquals(environment.getVersion(), updatedRemoteVersion);