mcdcorp / opentest

Open source test automation tool for web applications, mobile apps and APIs
https://getopentest.org
MIT License
447 stars 107 forks source link

Test Acquired by wrong actor and error while reading the session status from the sync server. #554

Closed melkorinos closed 1 year ago

melkorinos commented 2 years ago

Build: 1.3.8 Feb 25, 17:58 Commit: 50659ecda06a

Running a HTTP API GET request along with a Selenium file upload for API test throws an unexpected error on the sync server.

The tests work properly when launched individually. When run on the same session the issue occurs.

On iteration 3 (line 164) the ACTORAPI1 attempts to acquire api/APIFile [3], which he shouldn't since that test is assigned to ACTORWEB1. On the logs, you can see the two test actors "fighting ? " to acquire the test. Following that ACTORWEB1 is not able to finish iteration 3 because it is being held by ACTORAPI1 ?

Provided the logs. Please let me know if further data is needed. Tried to find a workaround using templates and tags but the issue persists.

Steps to reproduce:

  1. Run an API GET request and a Selenium test for file upload in the same session, using a testdata.yaml file for iterations. Use different actors for these two tests.

logs.txt

Relevant log information:


(paste log contents here)
"msg":"TRACE: Firing TEST_COMPLETED event...","v":0}
"msg":"==================== ACTORAPI1: api/APIFile [3] ====================","v":0}
"msg":"Actor ACTORAPI1 started executing test api/APIFile [3]...","v":0}
msg":"Using data record 3 of 4: 
custom\\\\sample.txt\"}","v":0}
msg":"TRACE: Firing TEST_STARTED event...","v":0}
"msg":"TRACE: Firing TEST_COMPLETED event...","v":0}
"msg":"TRACE: Firing SESSION_STARTED event...","v":0}
"msg":"ERROR: An error happened while reading the session status from the sync server, which shouldn't normally happen. Please 
"msg":"ERROR: An error happened while reading the session status from the sync server, which shouldn't normally happen. Please 
"msg":"DEBUG:   opentest-appium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"TRACE: Firing SESSION_STARTED event...","v":0}
"msg":"Actor 34240 of type ACTORWEB1 was acquired by test session 1648199577","v":0}
"msg":"Actor 12079 of type ACTORAPI1 was acquired by test session 1648199577","v":0}
"msg":"WARN: Failed to log extension JARs","v":0}
"msg":"DEBUG:   opentest-appium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"DEBUG:   opentest-base-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"ERROR: java.lang.RuntimeException: Failed to get or parse status data for session 1648199577\r\n\tat 
r\n\tat org.getopentest.base.TestActor.runOneSession(TestActor.java:3113)\r\n\tat org.getopentest.Main.main(Main.java:20)\r\nCaused 
va.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:101)\r\n\tat java.base/java.net.AbstractPlainSocketImpl.doConnect(
a.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237)\r\n\tat java.base/java.net.SocksSocketImpl.connect(
ry.connectSocket(PlainConnectionSocketFactory.java:75)\r\n\tat org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(
ionManager.java:376)\r\n\tat org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)\r\n\tat 
Exec.java:186)\r\n\tat org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)\r\n\tat 
te(CloseableHttpClient.java:83)\r\n\tat org.apache.http.impl.client.CloseableHttpClient.execute(
SessionStatus(TestActor.java:2513)\r\n\t... 3 more\r\n","v":0}
"msg":"DEBUG:   opentest-selenium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"TRACE: Firing SESSION_STARTED event...","v":0}
"msg":"DEBUG:   opentest-selenium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"WARN: Failed to log extension JARs","v":0}
"msg":"DEBUG:   opentest-appium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"DEBUG:   opentest-base-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
msg":"DEBUG:   opentest-base-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"DEBUG:   opentest-appium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"Actor 34240 of type ACTORWEB1 was acquired by test session 1648199577","v":0}
"msg":"Actor 34240 of type ACTORWEB1 was acquired by test session 1648199577","v":0}
"msg":"DEBUG:   opentest-base-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"DEBUG:   opentest-selenium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"TRACE: Firing SESSION_STARTED event...","v":0}
"msg":"DEBUG:   opentest-base-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"DEBUG:   opentest-appium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"WARN: Failed to log extension JARs","v":0}
msg":"DEBUG:   opentest-selenium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"DEBUG:   opentest-selenium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"DEBUG:   opentest-base-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
msg":"DEBUG: Test actor JAR versions:","v":0}
"msg":"DEBUG: Test actor JAR versions:","v":0}
"msg":"DEBUG:   opentest-selenium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
msg":"DEBUG:   opentest-base-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"WARN: Failed to log extension JARs","v":0}
"msg":"ERROR: An error happened while reading the session status from the sync server, which shouldn't normally happen. Please 
"msg":"DEBUG:   opentest-selenium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"DEBUG:   opentest-selenium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"DEBUG:   opentest-base-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"TRACE: Firing SESSION_STARTED event...","v":0}
msg":"WARN: Failed to log extension JARs","v":0}
"msg":"WARN: Failed to log extension JARs","v":0}
"msg":"DEBUG:   opentest-selenium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"DEBUG:   opentest-appium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"WARN: Failed to log extension JARs","v":0}
"msg":"DEBUG:   opentest-appium-0.0.1.jar: 2022-02-25 10:58 -0600 0.0.1-50659ecda06a8b79a41f24c1fdff05187324402b-dirty","v":0}
"msg":"TRACE: Firing SESSION_STARTED event...","v":0}
![error](https://user-images.githubusercontent.com/6871955/160115196-43c2b007-c74b-495f-9f5c-46e433454bd5.PNG)
stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.