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

Dont open connections if its not used #2

Open
PurHur opened this issue Jan 10, 2020 · 6 comments
Open

Dont open connections if its not used #2

PurHur opened this issue Jan 10, 2020 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@PurHur
Copy link
Contributor

PurHur commented Jan 10, 2020

Currently the imap connection in established when the extension is loaded. That is not good.

Please conenct only if its used and then also check if a reconnect is needed.

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.60. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the bug Something isn't working label Jan 10, 2020
@pmaasz
Copy link
Owner

pmaasz commented Jan 10, 2020

When executing your tests you authenticate yourself towards the mail server with the given credentials (behat.yaml). In the case that those credentials are incorrect or the server refuses the connection for whatever reason the tests fail.

To solve this behaviour, I would implement a Singleton and a Server class that handles the connection so it will fail when the appropriate test is executed. Also I should implement an exception handling so that the following tests will still be executable and behat won't crash. A solution would be to refactor the extension as a proper extension instead of a FeatureContext trait.

Thank you for your report!

Regards
pmaasz

@pmaasz
Copy link
Owner

pmaasz commented Jan 10, 2020

The first implementation of the connection optimization can be found on branch hotfix/2-connection.

@PurHur
Copy link
Contributor Author

PurHur commented Jan 10, 2020

Now we connect to the server on every mail test. Thats even more connections.

@jsmmo
Copy link

jsmmo commented Jan 24, 2020

???? is this still active?

@pmaasz
Copy link
Owner

pmaasz commented Aug 28, 2024

I will have another look at this. I think there is some stuff that needs to be cleaned up.

@pmaasz pmaasz self-assigned this Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants