From 966397e3bfe0d38aeca28c6aec0f543d62a0e2ea Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Wed, 6 Mar 2024 15:27:50 +0100 Subject: Add regression tests for inheritable thread-local memory leak Leak was introduced in commit 3c80a36527, fixing #128, but introducing #288 instead, which was the lesser of two evils, but still bad for some users unwilling to use native AspectJ syntax for their aspects, avoiding the problem. Relates to #288. Signed-off-by: Alexander Kriegisch --- .../aspectj/systemtest/ajc1921/Bugs1921Tests.java | 8 ++++ .../org/aspectj/systemtest/ajc1921/ajc1921.xml | 52 ++++++++++++++++++++++ 2 files changed, 60 insertions(+) (limited to 'tests/src/test') diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc1921/Bugs1921Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc1921/Bugs1921Tests.java index 40459ba8d..8395b5bbf 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc1921/Bugs1921Tests.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc1921/Bugs1921Tests.java @@ -23,6 +23,14 @@ public class Bugs1921Tests extends XMLBasedAjcTestCase { runTest("shared cache negative test"); } + public void testGitHub_288_AssertionError() { + runTest("memory leak for @AspectJ nested, non-inlined around-advice - AssertionError"); + } + + public void testGitHub_288_OutOfMemoryError() { + runTest("memory leak for @AspectJ nested, non-inlined around-advice - OutOfMemoryError"); + } + public static Test suite() { return XMLBasedAjcTestCase.loadSuite(Bugs1921Tests.class); } diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc1921/ajc1921.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc1921/ajc1921.xml index 975fa1c6c..494b6dadd 100644 --- a/tests/src/test/resources/org/aspectj/systemtest/ajc1921/ajc1921.xml +++ b/tests/src/test/resources/org/aspectj/systemtest/ajc1921/ajc1921.xml @@ -393,4 +393,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3