You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Gaël LHEZ <gl...@glowria.fr> on 2006/05/16 10:19:35 UTC

Waiting for all thread ('user') before continuing the test

Hi,

I have the following test to do :

I have 15 users that does some work (they have to register DVD, etc) on the
website I have to test. When this work is done, another people must do a
specific action : I'd like to wait for that specific action, before
continuing the test, where I need those particular action to be made.

Here is a "graphical" view of my test and what it should looks like :

WhileController: Is there some dvd to register ?
	HTTPSampler: register it
If not last user : 
	Wait
Else 
	Do the unique action (eg: only one thread should do it)
	Prepare data, and wake up all other user/thread
End

I can't separate this into severall test, as it is how it works. 

In term of Java, that would means something like this :

synchronized (nbUserThatFinishedTheTest) {
	++nbUserThatFinishedTheTest;
	if ( nbUserThatFinishedTheTest == nbUserThatMayFinishTheTest ) {
		doMyAction();
		nbUserThatMayFinishTheTest.notifyAll();
	} else while (nbUserThatFinishedTheTest<nbUserThatMayFinishTheTest)
		nbUserThatMayFinishTheTest.wait();
}

Before trying to make some "waiter" component, i'd like to know if it is
advised to do such in jMeter? (I'm not the architecturer of jMeter, so) (and
if it already exists, in that case that would be stupid to it).






 


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: java.util.ConcurrentModificationException while running tests

Posted by sebb <se...@gmail.com>.
Please create a Bugzilla issue. You can then attach the JMX file,
jmeter.properties and jmeter.log.

On 17/05/06, Gaël LHEZ <gl...@glowria.fr> wrote:
>
> Hi,
>
> I've got the following error while running my test :
>
> 2006/05/17 10:16:47 ERROR - jmeter.gui.action.ActionRouter:
> java.util.ConcurrentModificationException
> 	at java.util.LinkedList$ListItr.checkForComodification(Unknown
> Source)
> 	at java.util.LinkedList$ListItr.next(Unknown Source)
> 	at
> org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:977)
> 	at
> org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:979)
> 	at
> org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:979)
> 	at
> org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:979)
> 	at
> org.apache.jorphan.collections.HashTree.traverse(HashTree.java:962)
> 	at org.apache.jmeter.gui.action.Start.startEngine(Start.java:95)
> 	at org.apache.jmeter.gui.action.Start.doAction(Start.java:73)
> 	at
> org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:76
> )
> 	at
> org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:44)
> 	at
> org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:61)
> 	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
> 	at java.awt.EventQueue.dispatchEvent(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
> Source)
> 	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
> Source)
> 	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> 	at java.awt.EventDispatchThread.run(Unknown Source)
>
> The test looks like this (note: if newer version of jMeter could use the
> java.awt.dnd and java.awt.datatransfer package to manage drag and drop, and
> to set up a text version of tree node, so that we may copy it from jmeter to
> any app...)
>
> Root
>  |- Test 1
>  |    |- Include test1.jmx
>  |- Test 2
>  |    |- Include test2.jmx
>  |- View result in table
>
> The test does not run at all, except if I flood the event dispatch thread
> with Ctrl + R (well : if I try to run the test multiple times)
>
> I can provide the test used if needed.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


java.util.ConcurrentModificationException while running tests

Posted by Gaël LHEZ <gl...@glowria.fr>.
Hi, 

I've got the following error while running my test :
 
2006/05/17 10:16:47 ERROR - jmeter.gui.action.ActionRouter:
java.util.ConcurrentModificationException
	at java.util.LinkedList$ListItr.checkForComodification(Unknown
Source)
	at java.util.LinkedList$ListItr.next(Unknown Source)
	at
org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:977)
	at
org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:979)
	at
org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:979)
	at
org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:979)
	at
org.apache.jorphan.collections.HashTree.traverse(HashTree.java:962)
	at org.apache.jmeter.gui.action.Start.startEngine(Start.java:95)
	at org.apache.jmeter.gui.action.Start.doAction(Start.java:73)
	at
org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:76
)
	at
org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:44)
	at
org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:61)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source) 

The test looks like this (note: if newer version of jMeter could use the
java.awt.dnd and java.awt.datatransfer package to manage drag and drop, and
to set up a text version of tree node, so that we may copy it from jmeter to
any app...)

Root
 |- Test 1 
 |    |- Include test1.jmx
 |- Test 2 
 |    |- Include test2.jmx
 |- View result in table

The test does not run at all, except if I flood the event dispatch thread
with Ctrl + R (well : if I try to run the test multiple times)

I can provide the test used if needed.





---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


RE: Waiting for all thread ('user') before continuing the test

Posted by Gaël LHEZ <gl...@glowria.fr>.
>> I can't separate this into severall test, as it is how it works.
>
>Why not?
>
>Are they not different users?
>
>If you were testing with a browser, would you have to do it all in the same
session?

Well,  I  could  separate this into three part, but in the same thread
group  (eg:  I  want  the  same  user  at  beginning and at end). In a
browser context, that would be one user per PC.

>There is a synchronisation controller.
>
>You can create two thread groups, and run them consecutively.

You mean synchronized timer ? I've got to try it.

Is  there  some  compagnon  to  that timer (I'd like to avoid using If
Controller  as  it seems bugged), which would allow me to do an action
once  for the thread group (eg: only one thread do it). That action is
a long one, but with two synch' timer that should do it.



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Waiting for all thread ('user') before continuing the test

Posted by sebb <se...@gmail.com>.
On 16/05/06, Gaël LHEZ <gl...@glowria.fr> wrote:
> Hi,
>
> I have the following test to do :
>
> I have 15 users that does some work (they have to register DVD, etc) on the
> website I have to test. When this work is done, another people must do a
> specific action : I'd like to wait for that specific action, before
> continuing the test, where I need those particular action to be made.
>
> Here is a "graphical" view of my test and what it should looks like :
>
> WhileController: Is there some dvd to register ?
>         HTTPSampler: register it
> If not last user :
>         Wait
> Else
>         Do the unique action (eg: only one thread should do it)
>         Prepare data, and wake up all other user/thread
> End
>
> I can't separate this into severall test, as it is how it works.

Why not?

Are they not different users?

If you were testing with a browser, would you have to do it all in the
same session?

> In term of Java, that would means something like this :
>
> synchronized (nbUserThatFinishedTheTest) {
>         ++nbUserThatFinishedTheTest;
>         if ( nbUserThatFinishedTheTest == nbUserThatMayFinishTheTest ) {
>                 doMyAction();
>                 nbUserThatMayFinishTheTest.notifyAll();
>         } else while (nbUserThatFinishedTheTest<nbUserThatMayFinishTheTest)
>                 nbUserThatMayFinishTheTest.wait();
> }
>
> Before trying to make some "waiter" component, i'd like to know if it is
> advised to do such in jMeter? (I'm not the architecturer of jMeter, so) (and
> if it already exists, in that case that would be stupid to it).

There is a synchronisation controller.

You can create two thread groups, and run them consecutively.

S.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org