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

Session testing #72

Merged
merged 7 commits into from
Apr 14, 2020
Merged

Session testing #72

merged 7 commits into from
Apr 14, 2020

Conversation

Luidog
Copy link
Owner

@Luidog Luidog commented Apr 13, 2020

This PR updates multiple models to solve an issue (#71) where sessions are not reused. This PR modifies multiple models and methods. This commit modifies the agent, connection, and session models.

The agent model's watch method has been updated to iterate through sessions. The agent model will deactivate any session that has an empty request id. The watch method logic has also been updated to ensure it properly waits for an available session. The agent request method has been updated to fix an issue where multiple axios interceptors would be registered for an instance.

The connection model has been revised to remove the ready method and add a confirm and deactivate method. The confirm method will iterate through sessions and deactivate any sessions that are in an unknown state. The deactivate method will target a specific session for deactivation given an authorization header or id.

This commit revises the logout method of the admin utility for tests. The logout method will now only attempt to log out a session if there is already a valid token saved.

Signed-off-by: Lui de la Parra <Lui@mutesymphony.com>
This commit increases the test timeout to allow for the delayed update of sessions in the admin api.

Signed-off-by: Lui de la Parra <Lui@mutesymphony.com>
This commit adds session tests to isolate issue #71. This commit adds two tests to the test suite. The first test replicates the issue reported reported in the issue. The second tests ensure new sessions are created to prevent collisions.

Signed-off-by: Lui de la Parra <Lui@mutesymphony.com>
This commit expeands testing to include all tests.

Signed-off-by: Lui de la Parra <Lui@mutesymphony.com>
This commit revises the agent model request and watch methods. This commit should solve issue #71 and causes newly added tests to pass.

This commit revises the request method to eject any current intercepter when a new request is called.

This commit also revises the agent watch method to only create a session when their are pending requests and wait until there is an available session before queuing requests.

Signed-off-by: Lui de la Parra <Lui@mutesymphony.com>
This commit updates multiple models to fix an issue preventing sessions from being saved and tracked by the clients. This commit should close #71.

Signed-off-by: Lui de la Parra <Lui@mutesymphony.com>
This commit prevents the queue test from timing out by adding concurrency to the queue test. This commit causes all test to pass after fixing issue #71.

Signed-off-by: Lui de la Parra <Lui@mutesymphony.com>
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 99.664% when pulling bf3e8aa on sessions-testing into 941e76e on master.

@Luidog Luidog merged commit ba1f177 into master Apr 14, 2020
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