Downgrade JUnit to 4.10
The index tests for gerrit-review backend use some of the basic testing library in Gerrit but are currently unable to upgrade to JUnit 4.11. Change-Id: I4359067acf354a37c810559db0ceacd45cc791ff
This commit is contained in:
@@ -19,7 +19,6 @@ import static com.google.gerrit.extensions.common.ListChangesOption.CURRENT_REVI
|
||||
import static com.google.gerrit.extensions.common.ListChangesOption.DETAILED_LABELS;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
@@ -235,7 +234,9 @@ public abstract class AbstractSubmit extends AbstractDaemonTest {
|
||||
Repository repo = localGit.getRepository();
|
||||
RevCommit localHead = getHead(repo);
|
||||
RevCommit remoteHead = getRemoteHead();
|
||||
assertNotEquals(localHead.getId(), remoteHead.getId());
|
||||
assertFalse(
|
||||
String.format("%s not equal %s", localHead.name(), remoteHead.name()),
|
||||
localHead.getId().equals(remoteHead.getId()));
|
||||
assertEquals(1, remoteHead.getParentCount());
|
||||
if (!contentMerge) {
|
||||
assertEquals(getLatestDiff(repo), getLatestRemoteDiff());
|
||||
|
||||
@@ -21,7 +21,6 @@ import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.junit.Assume.assumeFalse;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
@@ -931,7 +930,7 @@ public abstract class AbstractQueryChangesTest {
|
||||
|
||||
@Test
|
||||
public void byHashtagWithNotedb() throws Exception {
|
||||
assumeTrue("notedb disabled", notesMigration.enabled());
|
||||
assumeTrue(notesMigration.enabled());
|
||||
List<Change> changes = setUpHashtagChanges();
|
||||
List<ChangeInfo> results = query("hashtag:foo");
|
||||
assertEquals(2, results.size());
|
||||
@@ -947,7 +946,7 @@ public abstract class AbstractQueryChangesTest {
|
||||
|
||||
@Test
|
||||
public void byHashtagWithoutNotedb() throws Exception {
|
||||
assumeFalse("notedb enabled", notesMigration.enabled());
|
||||
assumeTrue(!notesMigration.enabled());
|
||||
setUpHashtagChanges();
|
||||
assertTrue(query("hashtag:foo").isEmpty());
|
||||
assertTrue(query("hashtag:bar").isEmpty());
|
||||
|
||||
4
lib/BUCK
4
lib/BUCK
@@ -171,8 +171,8 @@ maven_jar(
|
||||
|
||||
maven_jar(
|
||||
name = 'junit',
|
||||
id = 'junit:junit:4.11',
|
||||
sha1 = '4e031bb61df09069aeb2bffb4019e7a5034a4ee0',
|
||||
id = 'junit:junit:4.10',
|
||||
sha1 = 'e4f1766ce7404a08f45d859fb9c226fc9e41a861',
|
||||
license = 'DO_NOT_DISTRIBUTE',
|
||||
deps = ['//lib/hamcrest:hamcrest-core'],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user