Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to AspectJ 1.9.20.1 #406

Closed
staniakm opened this issue Dec 9, 2023 · 1 comment
Closed

Upgrade to AspectJ 1.9.20.1 #406

staniakm opened this issue Dec 9, 2023 · 1 comment
Labels
dependencies Pull requests that update a dependency file
Milestone

Comments

@staniakm
Copy link
Contributor

staniakm commented Dec 9, 2023

There is an issue with delay when multiplierExpression is used. It starts since version 2.0.0. I've found that issue probably comes from aspectjweaver.
I have simple spring service writen in kotlin and really simple test for it. Test will fail with spring-retry 2.0.0 up to 2.0.4 but will pass for version 1.3.4
After bumping aspectjweaver from 1.9.20 to 1.9.20.1 building spring-retry locally problem was solved and test has passed

class RetiedService() {
    @Retryable(IllegalArgumentException::class,
        backoff = Backoff(
            delayExpression = "\${setup.delay}",
            multiplierExpression = "\${setup.multiplier}",
            ),
        maxAttempts = 4)
    fun toBeRetried() {
        println ("${Instant.now()} Running method")
        willThrow()
    }

    private fun willThrow() {
        throw IllegalArgumentException("some exception")
    }
}

Properties

setup.delay=500
setup.multiplier=2.0

And test

@SpringBootTest
class Demo3ApplicationTests {

    @Autowired
    lateinit var service: RetiedService

    @Test
    fun contextLoads() {
        val time = measureTimeMillis {
            assertThrows<IllegalArgumentException> {
                service.toBeRetried()
            }
        }
        println(time)
        assert(time > 3500)
    }
}
@artembilan
Copy link
Member

So, if you confirm that updating to the latest AspectJ 1.9.20.1 fixes the problem, may that is what enough to do in this project and the fix will be available in the next version we will plan to release this week?
If that a case, feel free to contribute such a fix.
Maybe your simple test would be great to have as an addition.

Thanks

@artembilan artembilan added this to the 2.0.5 milestone Dec 11, 2023
@artembilan artembilan added the dependencies Pull requests that update a dependency file label Dec 11, 2023
@snicoll snicoll changed the title Issue with aspectjweaver dependency used since version 2.0.0 Upgrade to AspectJ 1.9.20.1 Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants