CodeOwnerConfigValidatorIT: Fix flaky tests

If an import in a code owner config cannot be resolved the error message
always contains the revision in which the code owner config was not
found. If the import is done from another project this is the revision
of the other project.

The tests that were added in change Iadbe4262d wrongly expected to see
parent1 of the merge commit in the error message. This was only working
since the test framework by chance created the same initial commit in
both projects (same SHA1). If the creation of the initial commits are
not done in the same second the SHA1 differs and the tests fails.

Fix the bad assertions in the tests.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: Ifb54d0d6f1d4d46c66dcbe94a479fe6e5579cf19
diff --git a/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CodeOwnerConfigValidatorIT.java b/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CodeOwnerConfigValidatorIT.java
index 7f0e207..d74e52f 100644
--- a/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CodeOwnerConfigValidatorIT.java
+++ b/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CodeOwnerConfigValidatorIT.java
@@ -1738,7 +1738,7 @@
             codeOwnerConfigOperations.codeOwnerConfig(keyOfImportedCodeOwnerConfig).getFilePath(),
             otherProject.get(),
             targetBranchName,
-            parent1.name()));
+            projectOperations.project(otherProject).getHead(targetBranchName).getName()));
   }
 
   @Test
@@ -1835,7 +1835,7 @@
                 .codeOwnerConfig(keyOfNonExistingCodeOwnerConfig)
                 .getFilePath(),
             otherProject.get(),
-            parent1.name()));
+            projectOperations.project(otherProject).getHead("master").getName()));
   }
 
   @Test