Bug 869174 - The async executor is executed synchronously
The async executor is executed synchronously
Status: CLOSED NOTABUG
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity medium
: ER6
: 6.1.0
Assigned To: Tristan Tarrant
Martin Gencur
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-23 04:05 EDT by Anna Manukyan
Modified: 2012-12-12 08:59 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-12 08:59:59 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker ISPN-2508 Major Resolved The async executor is executed synchronously 2015-11-10 16:16 EST

  None (edit)
Description Anna Manukyan 2012-10-23 04:05:49 EDT
The functional tests which are testing the custom asynchronous executor, are failing with JDG-6.1.0.ER1 build due to the following reason:

the tests are verifying that the executor was executed in separate thread, i.e. asynchronously, but starting from the new Infinispan version, the executor's execution thread is the same as the one where the test is executed.

You can find the failing test results here:

http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/edg-60-jdbc-cache-stores-tomcat7/DATABASE=mysql51,jdk=java16_default,label=RHEL6_x86_64/101/testReport/com.jboss.datagrid.test.asyncnotif/AsyncExecutorNotifTest/testAsyncExecutorWithPassedParameters/

and here:

http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/edg-60-jdbc-cache-stores-tomcat7/DATABASE=mysql51,jdk=java16_default,label=RHEL6_x86_64/101/testReport/com.jboss.datagrid.test.asyncnotif/AsyncExecutorNotifTest/testAsyncExecutorDefaultParams/

The test is located here:

https://svn.devel.redhat.com/repos/jboss-qa/jdg/jdg-functional-tests/trunk/invm/async-notif/src/test/java/com/jboss/datagrid/test/asyncnotif/AsyncExecutorNotifTest.java 

Best regards,
Anna.
Comment 1 JBoss JIRA Server 2012-12-04 04:22:59 EST
Galder Zamarreño <galder.zamarreno@redhat.com> made a comment on jira ISPN-2508

Once again, the test failures are not there :(

Hmmmm, we already have a test that verifies that the async notification thread is different to the application thread:
https://github.com/infinispan/infinispan/blob/master/core/src/test/java/org/infinispan/notifications/AsyncNotificationTest.java

The test is passing, so maybe there's something else we need to look into? Can't see the failures to get an idea of the assert that's now failing.
Comment 2 JBoss JIRA Server 2012-12-04 04:35:03 EST
Anna Manukyan <amanukya@redhat.com> made a comment on jira ISPN-2508

Hi Galder,

sorry for broken test result links. Here is the assertion error:

{code}
Error Message

The executor thread didn't pass verification

Stacktrace

junit.framework.AssertionFailedError: The executor thread didn't pass verification
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at com.jboss.datagrid.test.asyncnotif.AsyncExecutorNotifTest.testAsyncExecutorWithPassedParameters(AsyncExecutorNotifTest.java:112)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:270)
	at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
	at org.jboss.arquillian.container.test.impl.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:38)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
	at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
	at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
	at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
	at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111)
	at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:263)
.......
{code}
And the following:

{code}
Error Message

The executor thread didn't pass verification

Stacktrace

junit.framework.AssertionFailedError: The executor thread didn't pass verification
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at com.jboss.datagrid.test.asyncnotif.AsyncExecutorNotifTest.testAsyncExecutorDefaultParams(AsyncExecutorNotifTest.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:270)
	at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
	at org.jboss.arquillian.container.test.impl.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:38)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
.........
{code}
Comment 3 JBoss JIRA Server 2012-12-06 03:09:42 EST
Galder Zamarreño <galder.zamarreno@redhat.com> made a comment on jira ISPN-2508

That assertion is not right. You're comparing threadRunningExecutor, which gets assigned to the main thread since it's executed outside the listener executor, and that's indeed equals to the main thread that executes the assertion. Not really sure what you're trying to assert there, but I guess what you wanna be comparing is that the thread that the executor thread creates is the same one used to run the async listener.
Comment 4 JBoss JIRA Server 2012-12-06 03:10:29 EST
Galder Zamarreño <galder.zamarreno@redhat.com> updated the status of jira ISPN-2508 to Resolved
Comment 5 Anna Manukyan 2012-12-06 08:14:25 EST
Hi Galder,

thanks a lot for hint.

The interesting thing is that, this assertion was passing successfully during JDG 6.0.1.CR1 testing, but after adding some logs, I've got what was wrong.

The test is fixed.

Best regards,
Anna.

Note You need to log in before you can comment on or make changes to this bug.