-
Notifications
You must be signed in to change notification settings - Fork 668
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
[GUI-tests] Open only one socket connection per test scenario #9948
Conversation
The socket api I designed for long running connections. |
If the connection will get closed after closing the desktop client then I guess we won't be able to reuse a single connection for a whole test-suite. That's why I was getting trouble using single connection for a test-suite. |
952eecd
to
a393d2f
Compare
a393d2f
to
f5e80b6
Compare
Kudos, SonarCloud Quality Gate passed! |
|
f5e80b6
to
434a34a
Compare
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like you mentioned above using a single socket for a test suite has a problem then this changes LGTM
In the GUI tests, the function
hasSyncStatus
opens a new socket connection every time it is called. The main issue is withwaitForFileOrFolderToHaveSyncStatus
function which callshasSyncStatus
function rapidly until the condition is met. So, there will be many socket connection requests in a single test scenario (which may or may not be an issue for the Unix socket server).IMO, I think we must open only a single socket connection per test scenario. So, in this PR, I have refactored the test code to only create a new socket connection if there is none and reuse the existing connection until a test scenario finishes and close the connection afterward. This way, we will open only one socket connection per scenario.
I tried to reuse a single connection for a whole test suite but that was not possible. I think the connection will be different every time we add a user to the client (I have no idea).