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

Add unit tests for AsyncStateMachine's asyncPostProcess method #828

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

koust6u
Copy link
Contributor

@koust6u koust6u commented Feb 16, 2025

Ensures correct behavior of AsyncStateMachine under different async states.
Helps prevent regressions by validating state transitions.
Isolates the logic from complex dependencies for more focused testing.

  • Added unit tests for various asyncPostProcess state transitions.
  • Replaced dependencies with fake objects for isolated testing.

This commit introduces several unit tests for verifying the behavior of the AsyncStateMachine. The tests check if the return of the asyncPostProcess() method under various states and conditions is as expected.
@dsoumis
Copy link
Contributor

dsoumis commented Feb 16, 2025

  1. Please ensure that you run ant validate or use Checkstyle tool with the checkstyle rules provided before submitting a PR. There are currently some checkstyle errors in your import statements.

  2. Consider utilizing EasyMock class instead of creating "Fake" classes for isolated testing. You may look into TestSSLValve.java for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants