Skip to content

Commit

Permalink
AjcTaskTest: Be more lenient with aspectjrt version warning
Browse files Browse the repository at this point in the history
Filter out a warning which occurs, if the current release does not match
the stored binary in lib/test:

  bad version number found in aspectjrt.jar
  expected 1.9.21.M1 found 1.9.20.1

If e.g. we run tests for a milestone release a.b.5.M1 and afterwards
switch back to a.b.5-SNAPSHOT, we do not want to update lib/test for a
single commit, just to make this test pass. Hence, we ignore this
warning here.

Signed-off-by: Alexander Kriegisch <[email protected]>
  • Loading branch information
kriegaex committed Nov 21, 2023
1 parent 9e09610 commit 37f3f6c
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,18 @@ private void check(
IMessage.Kind kind) {
if (num != IGNORE) {
int actual = holder.numMessages(kind, false);

// Filter out a warning which occurs, if the current release does not match the stored binary in lib/test.
// If e.g. we run tests for a milestone release a.b.5.M1 and afterwards switch back to a.b.5-SNAPSHOT, we do not
// want to update lib/test for a single commit, just to make this test pass. Hence, we ignore this warning here.
if (kind.equals(IMessage.WARNING)) {
for (IMessage message : holder.getMessages(kind, false)) {
String warningMessage = message.getMessage();
if (warningMessage.matches("bad version number found in .*aspectjrt.jar expected .* found .*"))
actual--;
}
}

if (num != actual) {
if (actual > 0) {
MessageUtil.print(
Expand Down

0 comments on commit 37f3f6c

Please sign in to comment.