[ https://issues.apache.org/jira/browse/GEODE-5551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16624273#comment-16624273 ]
ASF subversion and git services commented on GEODE-5551: -------------------------------------------------------- Commit cd17350f7f5c7b539a7558b07e347c7138c364f9 in geode's branch refs/heads/feature/GEODE-5772 from [~demery] [ https://gitbox.apache.org/repos/asf?p=geode.git;h=cd17350 ] GEODE-5551: Replace thread interleaving mechanism in LoginHandler...Test The MultithreadedTestCase class is unreliable under heavy contention for CPUs, causing the LoginHandlerInterceptorJUnitTest's thread safety test to fail intermittently in CI. We replaced MultithreadedTestCase (in this one class) with a more reliable Semaphore-based mechanism to coordinate the threads. Also: * Used ConcurrencyRule to run the multiple threads and collect errors. * Added geode-junit to geode-web test classpath, to pick up ConcurrencyRule. * Simplified the thread-safety test to focus on thread-safety, leaving basic correctness to other tests. Signed-off-by: Helena Bales <hba...@pivotal.io> > Flaky unit test LoginHandlerInterceptorJUnitTest > > testHandlerInterceptorThreadSafety > ------------------------------------------------------------------------------------- > > Key: GEODE-5551 > URL: https://issues.apache.org/jira/browse/GEODE-5551 > Project: Geode > Issue Type: Bug > Components: tests > Affects Versions: 1.8.0 > Reporter: Jacob S. Barrett > Assignee: Dale Emery > Priority: Major > Labels: flaky, pull-request-available, swat > Fix For: 1.8.0 > > Time Spent: 1h > Remaining Estimate: 0h > > {noformat} > > Task :geode-web:test > org.apache.geode.management.internal.web.controllers.support.LoginHandlerInterceptorJUnitTest > > testHandlerInterceptorThreadSafety FAILED > junit.framework.AssertionFailedError: expected:<0> but was:<3> > not all expectations were satisfied > expectations: > ! expected once, never invoked: > testHandlerInterceptorThreadSafety.HttpServletRequest.1.getParameterNames(); > returns > <org.apache.geode.management.internal.web.controllers.support.LoginHandlerInterceptorJUnitTest$1@4f0085f0> > ! expected once, never invoked: > testHandlerInterceptorThreadSafety.HttpServletRequest.1.getHeader("security-username"); > returns "admin" > ! expected once, never invoked: > testHandlerInterceptorThreadSafety.HttpServletRequest.1.getHeader("security-password"); > returns "password" > ! expected once, never invoked: > testHandlerInterceptorThreadSafety.HttpServletRequest.1.getParameter("vf.gf.env.STAGE"); > returns "test" > ! expected once, never invoked: > testHandlerInterceptorThreadSafety.HttpServletRequest.1.getParameter("vf.gf.env.GEODE_HOME"); > returns "/path/to/gemfire/700" > expected once, already invoked 1 time: securityService.login(not null); > returns a default value > expected once, already invoked 1 time: securityService.logout() > expected once, already invoked 1 time: > testHandlerInterceptorThreadSafety.HttpServletRequest.2.getParameterNames(); > returns > <org.apache.geode.management.internal.web.controllers.support.LoginHandlerInterceptorJUnitTest$1@2038a224> > expected once, already invoked 1 time: > testHandlerInterceptorThreadSafety.HttpServletRequest.2.getHeader("security-username"); > returns "admin" > expected once, already invoked 1 time: > testHandlerInterceptorThreadSafety.HttpServletRequest.2.getHeader("security-password"); > returns "password" > expected once, already invoked 1 time: > testHandlerInterceptorThreadSafety.HttpServletRequest.2.getParameter("vf.gf.env.HOST"); > returns "localhost" > expected once, already invoked 1 time: > testHandlerInterceptorThreadSafety.HttpServletRequest.2.getParameter("vf.gf.env.GEODE_HOME"); > returns "/path/to/gemfire/75" > ! expected once, never invoked: securityService.login(not null); > returns a default value > ! expected once, never invoked: securityService.logout() > what happened before this: > > testHandlerInterceptorThreadSafety.HttpServletRequest.2.getParameterNames() > > testHandlerInterceptorThreadSafety.HttpServletRequest.2.getParameter("vf.gf.env.HOST") > > testHandlerInterceptorThreadSafety.HttpServletRequest.2.getParameter("vf.gf.env.GEODE_HOME") > > testHandlerInterceptorThreadSafety.HttpServletRequest.2.getHeader("security-username") > > testHandlerInterceptorThreadSafety.HttpServletRequest.2.getHeader("security-password") > securityService.login(<{security-username=admin, > security-password=password}>) > securityService.logout() > at > org.jmock.api.ExpectationError.notAllSatisfied(ExpectationError.java:27) > at org.jmock.Mockery.assertIsSatisfied(Mockery.java:213) > at > org.apache.geode.management.internal.web.controllers.support.LoginHandlerInterceptorJUnitTest.tearDown(LoginHandlerInterceptorJUnitTest.java:70) > {noformat} > Failing: > https://concourse.apachegeode-ci.info/teams/main/pipelines/pr-develop/jobs/Build/builds/558 > Passing: > https://concourse.apachegeode-ci.info/teams/main/pipelines/pr-develop/jobs/Build/builds/559 -- This message was sent by Atlassian JIRA (v7.6.3#76005)