AbstractQueryChangesTest: Add a test with project name that requires URL encoding

This test is passing on both Lucene and Elasticsearch, but exposes
the problem in the staleness checker as reported in issue 9482. When
running the test, the RepositoryNotFoundException can be seen in the
logs.

Bug: Issue 9482
Change-Id: I3dfe66e0f2051a6743963c1660ba435b1f8694d3
This commit is contained in:
David Pursehouse
2018-07-27 10:53:53 +01:00
parent 6cbf49c7ab
commit aa21c11f2a

View File

@@ -2245,6 +2245,13 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
assertQuery(query);
}
@Test
public void byUrlEncodedProject() throws Exception {
TestRepository<Repo> repo = createProject("repo+foo");
Change change = insert(repo, newChange(repo));
assertQuery("project:repo+foo", change);
}
protected ChangeInserter newChange(TestRepository<Repo> repo) throws Exception {
return newChange(repo, null, null, null, null);
}