question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ReactorContextTestExecutionListener should use named hooks

See original GitHub issue

NOTE: This is marked for first time contributors only. If you want the issue, please comment to claim it. If you need any help with this issue, just ask on the ticket and we will be glad to help.

Summary

Currently, ReactorContextTestExecutionListener resets all previously set onLastOperator hooks: https://github.com/spring-projects/spring-security/blob/dca3645850e082d845e17a6572af84aa44b97f12/test/src/main/java/org/springframework/security/test/context/support/ReactorContextTestExecutionListener.java#L66-L68 This might affect users’ code, and it is recommended to use named hooks instead.

Actual Behavior

ReactorContextTestExecutionListener resets all pre-configured onLastOperator hooks after test method.

Expected Behavior

ReactorContextTestExecutionListener resets only the hooks it sets.

Version

5.1.1.RELEASE

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
aotitoolacommented, Nov 20, 2018

@rwinch I created a PR. #6122. Kindly review. Your feedback is important to me. Thanks for all the help.

2reactions
rwinchcommented, Nov 15, 2018

@daejii Thanks for volunteering! The issue is all yours. If you have any questions or need any help, please don’t hesitate to ask! Thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

11. Testing Method Security - Spring
Spring Security hooks into Spring Test support using the WithSecurityContextTestExecutionListener which will ensure our tests are ran with the correct user.
Read more >
org.springframework.security.test.context.support ...
ReactorContextTestExecutionListener maven / gradle build tool code. The class is part of the package ➦ Group: org.springframework.security ➦ Artifact: ...
Read more >
reactor.core.publisher.Hooks.onLastOperator java code ...
The passed function is applied to the original operator Publisher and can return a different Publisher, on the condition that it generically maintains...
Read more >
Hooks (reactor-core 3.5.0)
Should only be used by the instrumentation, DOES NOT guarantee any compatibility ... Add or replace a named Publisher operator interceptor for each...
Read more >
Server Hooks - IBM
A Server Hook is a function name that is defined in a script file. ... Security Directory Integrator for use for your own...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found