Revert "Revert "Adapt to change in Gerrit core that changed the ..."

Revert submission 433677-revert-of-submit-acl-improvment

Reason for revert: Rolling forward to implement a fix on top

Reverted changes: /q/submissionid:433677-revert-of-submit-acl-improvment

Change-Id: Ic590b94f165434344a08ed7cc9bcbe042ee43fb6
Reviewed-on: https://gerrit-review.googlesource.com/c/plugins/code-owners/+/433957
Tested-by: Zuul <zuul-63@gerritcodereview-ci.iam.gserviceaccount.com>
Reviewed-by: Frank Borden <frankborden@google.com>
diff --git a/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CodeOwnerSubmitRuleIT.java b/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CodeOwnerSubmitRuleIT.java
index e078738..1769dce 100644
--- a/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CodeOwnerSubmitRuleIT.java
+++ b/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CodeOwnerSubmitRuleIT.java
@@ -154,8 +154,9 @@
         .isEqualTo(
             String.format(
                 "Failed to submit 1 change due to the following problems:\n"
-                    + "Change %d: submit requirement 'Code-Owners' is unsatisfied.",
-                changeInfo._number));
+                    + "Change %d: Change %d is not ready:"
+                    + " submit requirement 'Code-Owners' is unsatisfied.",
+                changeInfo._number, changeInfo._number));
   }
 
   @Test
@@ -220,8 +221,9 @@
         .isEqualTo(
             String.format(
                 "Failed to submit 1 change due to the following problems:\n"
-                    + "Change %d: submit requirement 'Code-Owners' is unsatisfied.",
-                changeInfo._number));
+                    + "Change %d: Change %d is not ready:"
+                    + " submit requirement 'Code-Owners' is unsatisfied.",
+                changeInfo._number, changeInfo._number));
   }
 
   @Test
@@ -465,13 +467,15 @@
         .isEqualTo(
             String.format(
                 "Failed to submit 1 change due to the following problems:\n"
-                    + "Change %s: submit requirement 'Code-Owners' has an"
-                    + " error: Submittability expression result has an error:"
+                    + "Change %d: Change %d is not ready:"
+                    + " submit requirement 'Code-Owners' has an error:"
+                    + " Submittability expression result has an error:"
                     + " Failed to evaluate code owner statuses for"
-                    + " patch set 1 of change %s (cause: invalid code owner config file '%s'"
+                    + " patch set 1 of change %d (cause: invalid code owner config file '%s'"
                     + " (project = %s, branch = master):\n  %s).%s",
                 changeInfo._number,
                 changeInfo._number,
+                changeInfo._number,
                 JgitPath.of(nameOfInvalidCodeOwnerConfigFile).getAsAbsolutePath(),
                 project,
                 getParsingErrorMessageForNonParseableCodeOwnerConfig(),
@@ -519,13 +523,15 @@
         .isEqualTo(
             String.format(
                 "Failed to submit 1 change due to the following problems:\n"
-                    + "Change %s: submit requirement 'Code-Owners' has an"
+                    + "Change %d: Change %d is not ready:"
+                    + " submit requirement 'Code-Owners' has an"
                     + " error: Submittability expression result has an error:"
                     + " Failed to evaluate code owner statuses for"
-                    + " patch set 1 of change %s (cause: invalid code owner config file '%s'"
+                    + " patch set 1 of change %d (cause: invalid code owner config file '%s'"
                     + " (project = %s, branch = master):\n  %s).",
                 changeInfo._number,
                 changeInfo._number,
+                changeInfo._number,
                 JgitPath.of(nameOfInvalidCodeOwnerConfigFile).getAsAbsolutePath(),
                 project,
                 getParsingErrorMessageForNonParseableCodeOwnerConfig()));