You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2025/09/23 19:46:03 UTC
[PR] adds constraint class name to error message [accumulo]
keith-turner opened a new pull request, #5926:
URL: https://github.com/apache/accumulo/pull/5926
fixes #5914
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] adds constraint class name to error message [accumulo]
Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner merged PR #5926:
URL: https://github.com/apache/accumulo/pull/5926
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] adds constraint class name to error message [accumulo]
Posted by "ctubbsii (via GitHub)" <gi...@apache.org>.
ctubbsii commented on code in PR #5926:
URL: https://github.com/apache/accumulo/pull/5926#discussion_r2373635321
##########
test/src/main/java/org/apache/accumulo/test/functional/ConstraintIT.java:
##########
@@ -322,6 +324,11 @@ private void test2(AccumuloClient client, String table, boolean doFlush) throws
"Unexpected " + cvs.constrainClass + " " + cvs.numberOfViolatingMutations);
}
}
+
+ assertTrue(mre.getMessage().contains(
+ "constraint violation codes : {org.apache.accumulo.test.constraints.NumericValueConstraint=[1], org.apache.accumulo.test.constraints.AlphaNumKeyConstraint=[1]}")
+ || mre.getMessage().contains(
+ "constraint violation codes : {org.apache.accumulo.test.constraints.AlphaNumKeyConstraint=[1], org.apache.accumulo.test.constraints.NumericValueConstraint=[1]}"));
Review Comment:
haha, nice... definitely easier than parsing the result... just look for either of the two ordering options 😺
I wish these gave different error codes, though, or if one of them had more violations, so we could see the set different between the two types (so, we could verify that constraint A had two violations, and constraint B had one, or had different violation codes).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] adds constraint class name to error message [accumulo]
Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on code in PR #5926:
URL: https://github.com/apache/accumulo/pull/5926#discussion_r2376565282
##########
test/src/main/java/org/apache/accumulo/test/functional/ConstraintIT.java:
##########
@@ -322,6 +324,11 @@ private void test2(AccumuloClient client, String table, boolean doFlush) throws
"Unexpected " + cvs.constrainClass + " " + cvs.numberOfViolatingMutations);
}
}
+
+ assertTrue(mre.getMessage().contains(
+ "constraint violation codes : {org.apache.accumulo.test.constraints.NumericValueConstraint=[1], org.apache.accumulo.test.constraints.AlphaNumKeyConstraint=[1]}")
+ || mre.getMessage().contains(
+ "constraint violation codes : {org.apache.accumulo.test.constraints.AlphaNumKeyConstraint=[1], org.apache.accumulo.test.constraints.NumericValueConstraint=[1]}"));
Review Comment:
Having different codes is a better test. Was easy to make that change w/ the existing test code, updated in c09ae60
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org