You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These two tests always fail during the first test try, and sometimes fail all the way through all the test tries. The issue is caused by TestNG running the many*Logs test groups in a separate thread from the typical*Logs test groups. This results in an error as the LocalUserService used in GaeSimulation is not thread safe and throws an error when it is called from different threads.
The root issue lies with TestNG not honouring the specified parallel settings when the priority flag is set in the @Test annotation. There is a bug in the before/after mechanism that breaks the parallel feature (testng-team/testng#1185).
Workaround: either set singleThreaded = true on the test classes or drop the use of priority.
Stack trace for AdminActivityLogPageActionTest:
java.lang.IllegalStateException: Operation not allowed in a thread that is neither the original request thread nor a thread created by ThreadManager
at com.google.appengine.api.users.UserServiceImpl.getCurrentEnvironmentOrThrow(UserServiceImpl.java:152)
at com.google.appengine.api.users.UserServiceImpl.getCurrentUser(UserServiceImpl.java:109)
at teammates.logic.api.GateKeeper.getCurrentGoogleUser(GateKeeper.java:305)
at teammates.logic.api.GateKeeper.getCurrentUser(GateKeeper.java:37)
at teammates.ui.controller.Action.authenticateUser(Action.java:238)
at teammates.ui.controller.Action.init(Action.java:98)
at teammates.ui.controller.ActionFactory.getAction(ActionFactory.java:143)
at teammates.test.driver.GaeSimulation.getActionObject(GaeSimulation.java:169)
at teammates.test.cases.action.AdminActivityLogPageActionTest.getAction(AdminActivityLogPageActionTest.java:567)
at teammates.test.cases.action.AdminActivityLogPageActionTest.statusMessageAndContinueSearch_withManyLogs_searchCorrectly(AdminActivityLogPageActionTest.java:390)
...
Failed suite [Failed suite [Failed suite [ci-tests]]] > component-tests(failed)(failed)(failed) > teammates.test.cases.action.AdminActivityLogPageActionTest.statusMessageAndContinueSearch_withManyLogs_searchCorrectly FAILED
java.lang.IllegalStateException at AdminActivityLogPageActionTest.java:567
Stack trace for AdminEmailLogPageActionTest:
java.lang.IllegalStateException: Operation not allowed in a thread that is neither the original request thread nor a thread created by ThreadManager
at com.google.appengine.api.users.UserServiceImpl.getCurrentEnvironmentOrThrow(UserServiceImpl.java:152)
at com.google.appengine.api.users.UserServiceImpl.getCurrentUser(UserServiceImpl.java:109)
at teammates.logic.api.GateKeeper.getCurrentGoogleUser(GateKeeper.java:305)
at teammates.logic.api.GateKeeper.getCurrentUser(GateKeeper.java:37)
at teammates.ui.controller.Action.authenticateUser(Action.java:238)
at teammates.ui.controller.Action.init(Action.java:98)
at teammates.ui.controller.ActionFactory.getAction(ActionFactory.java:143)
at teammates.test.driver.GaeSimulation.getActionObject(GaeSimulation.java:169)
at teammates.test.cases.action.AdminEmailLogPageActionTest.getAction(AdminEmailLogPageActionTest.java:427)
at teammates.test.cases.action.AdminEmailLogPageActionTest.statusMessageAndContinueSearch_withManyLogs_searchCorrectly(AdminEmailLogPageActionTest.java:291)
...
Failed suite [Failed suite [Failed suite [ci-tests]]] > component-tests(failed)(failed)(failed) > teammates.test.cases.action.AdminEmailLogPageActionTest.statusMessageAndContinueSearch_withManyLogs_searchCorrectly FAILED
java.lang.IllegalStateException at AdminEmailLogPageActionTest.java:427
The text was updated successfully, but these errors were encountered:
whipermr5
added
a-Testing
Testing-related traits such as efficiency, robustness, coverage
p.Medium
Marginal impact; would like to do if time permits
labels
Jul 24, 2017
These two tests always fail during the first test try, and sometimes fail all the way through all the test tries. The issue is caused by TestNG running the
many*Logs
test groups in a separate thread from thetypical*Logs
test groups. This results in an error as theLocalUserService
used inGaeSimulation
is not thread safe and throws an error when it is called from different threads.The root issue lies with TestNG not honouring the specified parallel settings when the
priority
flag is set in the@Test
annotation. There is a bug in the before/after mechanism that breaks the parallel feature (testng-team/testng#1185).Workaround: either set
singleThreaded = true
on the test classes or drop the use ofpriority
.Stack trace for
AdminActivityLogPageActionTest
:Stack trace for
AdminEmailLogPageActionTest
:The text was updated successfully, but these errors were encountered: