aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2023-06-04 12:52:54 +0200
committerAlexander Kriegisch <Alexander@Kriegisch.name>2023-06-04 13:01:54 +0200
commit89597d34eec7cab349a1c00a5a2bd85795b9a8f4 (patch)
treeb59349adeb64137f56199a586ddade4389672166
parent7fb9f8690c6ec7fe7864cfd79a4f2e45c8f2e6a1 (diff)
downloadaspectj-89597d34eec7cab349a1c00a5a2bd85795b9a8f4.tar.gz
aspectj-89597d34eec7cab349a1c00a5a2bd85795b9a8f4.zip
Fix XML config for Bugs1919Tests.test_GitHub_214
The test started breaking on GitHub, but ran fine locally, which implied some kind of classpath ordering issue. As it turned out, for XML tests all JARs found in the sandbox directory are added to the classpath automatically. So if we do not want them on the classpath, we need to delete or rename them before running. In this case, however, it was enough to make sure the classpath order is correct, so that the duplicate 'Application' class is found in the woven version, not in the unwoven one by chance. We therefore need to use the correct syntax, 1. separating classpath entries by comma, not space, 2. prepending '$sandbox/' to the JAR name. Now the test reliably does what it should have done from the start: run the woven code. Until now, the output assertions were adjusted to the weird result of no aspect logs being present on the console, which was wrong right from the start. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc1919/ajc1919.xml6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc1919/ajc1919.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc1919/ajc1919.xml
index 5ff07be04..d31b35aa1 100644
--- a/tests/src/test/resources/org/aspectj/systemtest/ajc1919/ajc1919.xml
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc1919/ajc1919.xml
@@ -370,7 +370,7 @@
<message kind="warning" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard [Xlint:noGuardForLazyTjp]"/>
<message kind="warning" text="advice defined in FirstAspect has not been applied [Xlint:adviceDidNotMatch]"/>
</compile>
- <compile files="Application.java MarkerTwo.java" options="-1.5 -showWeaveInfo -Xlint:warning" classpath="first-aspect.jar" outjar="application.jar"/>
+ <compile files="Application.java MarkerTwo.java" options="-1.5 -showWeaveInfo -Xlint:warning" classpath="$sandbox/first-aspect.jar" outjar="application.jar"/>
<compile files="SecondAspect.java" options="-1.5 -showWeaveInfo -Xlint:warning" aspectpath="first-aspect.jar" inpath="application.jar" outjar="second-aspect.jar">
<message kind="warning" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard [Xlint:noGuardForLazyTjp]"/>
<message kind="warning" text="at this shadow method-execution(void Application.greet(java.lang.String)) no precedence is specified between advice applying from aspect FirstAspect and aspect SecondAspect [Xlint:unorderedAdviceAtShadow]"/>
@@ -378,8 +378,10 @@
<message kind="weave" text="method-execution(void Application.greet(java.lang.String))' in Type 'Application' (Application.java:4) advised by around advice from 'SecondAspect'"/>
<message kind="weave" text="method-execution(void Application.greet(java.lang.String))' in Type 'Application' (Application.java:4) advised by before advice from 'FirstAspect'"/>
</compile>
- <run class="Application" classpath="second-aspect.jar first-aspect.jar">
+ <run class="Application" classpath="$sandbox/second-aspect.jar,$sandbox/first-aspect.jar">
<stdout>
+ <line text="FirstAspect: execution(void Application.greet(String))"/>
+ <line text="SecondAspect: execution(void Application.greet(String))"/>
<line text="Hello world!"/>
</stdout>
</run>