aboutsummaryrefslogtreecommitdiffstats
path: root/taskdefs/src
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2023-11-21 07:51:58 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2023-11-21 07:51:58 +0700
commit37f3f6c11135d0d6cac6ec2511f8d2baefdc8457 (patch)
tree9d8ddf0d76b59953230cdc7afdaffd2e98dce7bb /taskdefs/src
parent9e09610f1ab49361c68c7d3d6f40ad71fb267f79 (diff)
downloadaspectj-37f3f6c11135d0d6cac6ec2511f8d2baefdc8457.tar.gz
aspectj-37f3f6c11135d0d6cac6ec2511f8d2baefdc8457.zip
AjcTaskTest: Be more lenient with aspectjrt version warning
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 <Alexander@Kriegisch.name>
Diffstat (limited to 'taskdefs/src')
-rw-r--r--taskdefs/src/test/java/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/taskdefs/src/test/java/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java b/taskdefs/src/test/java/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java
index eefb37ad6..ae67012b9 100644
--- a/taskdefs/src/test/java/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java
+++ b/taskdefs/src/test/java/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java
@@ -1021,6 +1021,18 @@ public class AjcTaskTest extends TestCase {
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(