diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2022-02-28 18:44:07 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2022-03-23 15:39:14 +0700 |
commit | 9d35aceab5f642c8d8eaa59ddae4ed2c66a081ed (patch) | |
tree | d00ef3fbc92cf19261b45727a9f6419c54e65aed /tests/src/test | |
parent | 72e91478f44129d92716807742cd7474265ff5da (diff) | |
download | aspectj-9d35aceab5f642c8d8eaa59ddae4ed2c66a081ed.tar.gz aspectj-9d35aceab5f642c8d8eaa59ddae4ed2c66a081ed.zip |
Expand "asynchronous proceed for nested around-advice" to 4 scenarios:
1. @AspectJ syntax, threads created inside advice code
2. @AspectJ syntax, submit runnable to thread pool
3. native syntax, threads created inside advice code
4. native syntax, submit runnable to thread pool
Scenarios 1, 3 and 4 are passing, while 2 is failing.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'tests/src/test')
-rw-r--r-- | tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Tests.java | 14 | ||||
-rw-r--r-- | tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml | 239 |
2 files changed, 251 insertions, 2 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Tests.java index ac151b127..9421f4aee 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Tests.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Tests.java @@ -49,7 +49,19 @@ public class Bugs198Tests extends XMLBasedAjcTestCase { } public void testAsyncProceedNestedAroundAdvice_gh128() { - runTest("asynchronous proceed for nested around-advice chain"); + runTest("asynchronous proceed for nested around-advice (@AspectJ)"); + } + + public void testAsyncProceedNestedAroundAdviceThreadPool_gh128() { + runTest("asynchronous proceed for nested around-advice (@AspectJ, thread pool)"); + } + + public void testAsyncProceedNestedAroundAdviceNative_gh128() { + runTest("asynchronous proceed for nested around-advice (native)"); + } + + public void testAsyncProceedNestedAroundAdviceNativeThreadPool_gh128() { + runTest("asynchronous proceed for nested around-advice (native, thread pool)"); } public static Test suite() { diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml index aadf36f92..0e1132782 100644 --- a/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml +++ b/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml @@ -167,7 +167,7 @@ </run> </ajc-test> - <ajc-test dir="bugs198/github_128" title="asynchronous proceed for nested around-advice chain"> + <ajc-test dir="bugs198/github_128" title="asynchronous proceed for nested around-advice (@AspectJ)"> <compile files="Application.java MarkerA.java MarkerAAspect.aj MarkerB.java MarkerBAspect.aj" options="-1.8" /> <run class="Application" options="1,1"> <stdout ordered="no"> @@ -246,4 +246,241 @@ </run> </ajc-test> + <ajc-test dir="bugs198/github_128" title="asynchronous proceed for nested around-advice (@AspectJ, thread pool)"> + <compile files="Application.java MarkerA.java MarkerAAspect.aj MarkerB.java MarkerBAspect.aj" options="-1.8" /> + <run class="Application" options="1,1,true"> + <stdout ordered="no"> + <line text=">> Outer intercept"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" << Inner intercept"/> + <line text=" << Outer proceed"/> + <line text="<< Outer intercept"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + </stdout> + </run> + <run class="Application" options="2,1,true"> + <stdout ordered="no"> + <line text=">> Outer intercept"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" << Inner intercept"/> + <line text=" << Outer proceed"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text=" << Inner intercept"/> + <line text=" << Outer proceed"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text="<< Outer intercept"/> + </stdout> + </run> + <run class="Application" options="1,2,true"> + <stdout ordered="no"> + <line text=">> Outer intercept"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" << Inner intercept"/> + <line text=" << Outer proceed"/> + <line text="<< Outer intercept"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + </stdout> + </run> + <run class="Application" options="2,2,true"> + <stdout ordered="no"> + <line text=">> Outer intercept"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" << Inner intercept"/> + <line text=" << Outer proceed"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" >> Inner proceed"/> + <line text=" << Inner intercept"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text=" << Outer proceed"/> + <line text=" >> Inner proceed"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text="<< Outer intercept"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs198/github_128" title="asynchronous proceed for nested around-advice (native)"> + <compile files="Application.java MarkerA.java MarkerANativeAspect.aj MarkerB.java MarkerBNativeAspect.aj" options="-1.8" /> + <run class="Application" options="1,1"> + <stdout ordered="no"> + <line text=">> Outer intercept"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" << Inner intercept"/> + <line text=" << Outer proceed"/> + <line text="<< Outer intercept"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + </stdout> + </run> + <run class="Application" options="2,1"> + <stdout ordered="no"> + <line text=">> Outer intercept"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" << Inner intercept"/> + <line text=" << Outer proceed"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text=" << Inner intercept"/> + <line text=" << Outer proceed"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text="<< Outer intercept"/> + </stdout> + </run> + <run class="Application" options="1,2"> + <stdout ordered="no"> + <line text=">> Outer intercept"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" << Inner intercept"/> + <line text=" << Outer proceed"/> + <line text="<< Outer intercept"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + </stdout> + </run> + <run class="Application" options="2,2"> + <stdout ordered="no"> + <line text=">> Outer intercept"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" << Inner intercept"/> + <line text=" << Outer proceed"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" >> Inner proceed"/> + <line text=" << Inner intercept"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text=" << Outer proceed"/> + <line text=" >> Inner proceed"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text="<< Outer intercept"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs198/github_128" title="asynchronous proceed for nested around-advice (native, thread pool)"> + <compile files="Application.java MarkerA.java MarkerANativeAspect.aj MarkerB.java MarkerBNativeAspect.aj" options="-1.8" /> + <run class="Application" options="1,1,true"> + <stdout ordered="no"> + <line text=">> Outer intercept"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" << Inner intercept"/> + <line text=" << Outer proceed"/> + <line text="<< Outer intercept"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + </stdout> + </run> + <run class="Application" options="2,1,true"> + <stdout ordered="no"> + <line text=">> Outer intercept"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" << Inner intercept"/> + <line text=" << Outer proceed"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text=" << Inner intercept"/> + <line text=" << Outer proceed"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text="<< Outer intercept"/> + </stdout> + </run> + <run class="Application" options="1,2,true"> + <stdout ordered="no"> + <line text=">> Outer intercept"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" << Inner intercept"/> + <line text=" << Outer proceed"/> + <line text="<< Outer intercept"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + </stdout> + </run> + <run class="Application" options="2,2,true"> + <stdout ordered="no"> + <line text=">> Outer intercept"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" << Inner intercept"/> + <line text=" << Outer proceed"/> + <line text=" >> Outer proceed"/> + <line text=" >> Inner intercept"/> + <line text=" >> Inner proceed"/> + <line text=" << Inner intercept"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text=" << Outer proceed"/> + <line text=" >> Inner proceed"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text=" >> Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text=" Doing something"/> + <line text=" << Inner proceed"/> + <line text="<< Outer intercept"/> + </stdout> + </run> + </ajc-test> + </suite> |