DO NOT REPLY [Bug 47886] New: Use ThreadPool for threads rather than create/start() with delay

2009-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47886

   Summary: Use ThreadPool for threads rather than create/start()
with delay
   Product: JMeter
   Version: unspecified
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Main
AssignedTo: jmeter-dev@jakarta.apache.org
ReportedBy: cflic...@novator.com


Created an attachment (id=24300)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=24300)
sample of the quick/dirty implementation i made of thread pool

For long running tests for 1000s perhaps 10s of 1000s of users,
creating/starting that many threads is unreasonable and an unnecessary use of
resources when many of them sleep for extended periods of time.  Since java 1.5
incorporated many of the basic thread pools, they can easily be used.  Attached
is a sample of the quick hack that I did to use a scheduled thread pool.  It
works for my use, but may not work for all uses.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 47886] Use ThreadPool for threads rather than create/start() with delay

2009-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47886

Flick cflic...@novator.com changed:

   What|Removed |Added

  Attachment #24300|jmeter2.2threadpool.patch   |jmeter2.3.2threadpool.patch
   filename||

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 47886] Use ThreadPool for threads rather than create/start() with delay

2009-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47886

Flick cflic...@novator.com changed:

   What|Removed |Added

Version|unspecified |2.3.2

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 47886] Use ThreadPool for threads rather than create/start() with delay

2009-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47886

Sebb s...@apache.org changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #1 from Sebb s...@apache.org 2009-09-22 07:21:47 PDT ---
Thanks for the patch, though it seems to be made against JMeter 2.3.2 rather
than the current SVN.

Also it disables graceful shutdown.

I can see that it would help for a test that has a large total number of
threads where only a few are active at any one time, i.e. where there is a long
ramp-up delay compared with the time it takes to run the tests in a thread.
[But there are better ways to structure a test like that].

However, how does it help with a test where most/all of the threads are active
concurrently? Does thread execution automatically switch between pool entries
during a wait?

If so, there are quite a lot of samplers etc. that have been written assuming
that a single instance will only be run by a single thread. I'm not sure how
these will behave if they can be called from various different threads.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 47886] Use ThreadPool for threads rather than create/start() with delay

2009-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47886

Flick cflic...@novator.com changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #2 from Flick cflic...@novator.com 2009-09-22 08:03:09 PDT ---
The patch was just an example of what I hacked together to get our environment
working.  In no way is it intended to be elegant, just a sample.  I am
unfamiliar with the jmeter code base in its entirety and all the various
samplers, but I think it is still reasonable to have something like this
supported.  The thread pool i used doesn't fix the size at the configured
amount, that's just how many are kept in the pool even when idle.  If the
configured sampler had a high number of threads needing to execute
simultaneously, the pool would create more.  It would still help my situation
where i have 20K+ users executing over a 60 minute period resulting in only
about 10-60 concurrent threads depending on response times.

In my sample, the state is maintained in the JMeterThread object, not the
Thread, and the context still uses ThreadLocal since a given Thread from the
thread pool is only used by one JMeterThread at a time.

Also, graceful shutdown could still be supported.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r817687 - /jakarta/jmeter/trunk/build.xml

2009-09-22 Thread sebb
Author: sebb
Date: Tue Sep 22 15:03:33 2009
New Revision: 817687

URL: http://svn.apache.org/viewvc?rev=817687view=rev
Log:
Prevent class files from being added twice

Modified:
jakarta/jmeter/trunk/build.xml

Modified: jakarta/jmeter/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/build.xml?rev=817687r1=817686r2=817687view=diff
==
--- jakarta/jmeter/trunk/build.xml (original)
+++ jakarta/jmeter/trunk/build.xml Tue Sep 22 15:03:33 2009
@@ -878,7 +878,6 @@
 /jar
!-- Build junit/test.jar sample --
 jar jarfile=${lib.dir}/junit/test.jar 
manifest=${build.dir}/MANIFEST_BIN.MF
-  fileset dir=${build.junit} includes=**/*.class /
   fileset dir=${build.junit} excludes=org/**/* /
   fileset dir=${src.junit}   excludes=org/**/* /
   metainf dir=. includes=LICENSE,NOTICE/



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r817688 - in /jakarta/jmeter/trunk: lib/junit/ src/junit/test/ src/junit/woolfel/

2009-09-22 Thread sebb
Author: sebb
Date: Tue Sep 22 15:04:14 2009
New Revision: 817688

URL: http://svn.apache.org/viewvc?rev=817688view=rev
Log:
More JUnit test cases

Added:
jakarta/jmeter/trunk/src/junit/test/AfterAnnotatedTest.java   (with props)
jakarta/jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java   (with props)
jakarta/jmeter/trunk/src/junit/test/SetupTestError.java   (with props)
jakarta/jmeter/trunk/src/junit/test/SetupTestFail.java   (with props)
jakarta/jmeter/trunk/src/junit/test/TearDownTestFail.java   (with props)
Modified:
jakarta/jmeter/trunk/lib/junit/test.jar
jakarta/jmeter/trunk/src/junit/test/DummyAnnotatedTest.java
jakarta/jmeter/trunk/src/junit/woolfel/DummyTestCase.java

Modified: jakarta/jmeter/trunk/lib/junit/test.jar
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/lib/junit/test.jar?rev=817688r1=817687r2=817688view=diff
==
Binary files - no diff available.

Added: jakarta/jmeter/trunk/src/junit/test/AfterAnnotatedTest.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/test/AfterAnnotatedTest.java?rev=817688view=auto
==
--- jakarta/jmeter/trunk/src/junit/test/AfterAnnotatedTest.java (added)
+++ jakarta/jmeter/trunk/src/junit/test/AfterAnnotatedTest.java Tue Sep 22 
15:04:14 2009
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package test;
+
+import static org.junit.Assert.fail;
+import org.junit.After;
+import org.junit.Test;
+
+/**
+ * Test to demonstrate how @After failures are handled
+ */
+public class AfterAnnotatedTest {
+
+@After
+public void afterFail(){
+fail(afterFail());
+}
+
+@Test
+public void afterTest(){
+// Dummy to ensure there is a test to run
+}
+}

Propchange: jakarta/jmeter/trunk/src/junit/test/AfterAnnotatedTest.java
--
svn:eol-style = native

Propchange: jakarta/jmeter/trunk/src/junit/test/AfterAnnotatedTest.java
--
svn:keywords = Author Date Id Revision

Added: jakarta/jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java?rev=817688view=auto
==
--- jakarta/jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java (added)
+++ jakarta/jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java Tue Sep 22 
15:04:14 2009
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package test;
+
+import static org.junit.Assert.fail;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test to demonstrate how @Before failures are handled
+ */
+public class BeforeAnnotatedTest {
+
+@Before
+public void beginFail(){
+fail(beginFail());
+}
+
+@Test
+public void beginTest(){
+// Dummy to ensure there is a test to run
+}
+}

Propchange: jakarta/jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java
--
svn:eol-style = native

Propchange: jakarta/jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java

svn commit: r817689 - /jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java

2009-09-22 Thread sebb
Author: sebb
Date: Tue Sep 22 15:10:49 2009
New Revision: 817689

URL: http://svn.apache.org/viewvc?rev=817689view=rev
Log:
Use threadStarted() to set up common variables for the sample() method
Improve handling of InvocationTargetException

Modified:

jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java

Modified: 
jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java?rev=817689r1=817688r2=817689view=diff
==
--- 
jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java
 (original)
+++ 
jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java
 Tue Sep 22 15:10:49 2009
@@ -25,7 +25,6 @@
 import java.util.Enumeration;
 
 import junit.framework.AssertionFailedError;
-import junit.framework.ComparisonFailure;
 import junit.framework.Protectable;
 import junit.framework.TestCase;
 import junit.framework.TestFailure;
@@ -34,6 +33,7 @@
 import org.apache.jmeter.samplers.AbstractSampler;
 import org.apache.jmeter.samplers.Entry;
 import org.apache.jmeter.samplers.SampleResult;
+import org.apache.jmeter.testelement.ThreadListener;
 import org.apache.jorphan.logging.LoggingManager;
 import org.apache.log.Logger;
 import org.junit.After;
@@ -48,7 +48,7 @@
  * constructor first. If the test class does not declare a string
  * constructor, the sampler will try empty constructor.
  */
-public class JUnitSampler extends AbstractSampler {
+public class JUnitSampler extends AbstractSampler implements ThreadListener {
 
 private static final Logger log = LoggingManager.getLoggerForClass();
 
@@ -75,15 +75,21 @@
 private static final String TEARDOWN = tearDown;
 
 /// the Method objects for setUp and tearDown methods
-private transient Method SETUP_METHOD = null;
-private transient Method TDOWN_METHOD = null;
-private boolean checkStartUpTearDown = false;
+private transient Method SETUP_METHOD;
+private transient Method TDOWN_METHOD;
 
 // The TestCase to run
-private transient TestCase TEST_INSTANCE = null;
+private transient TestCase TEST_INSTANCE;
 // The test object; same as TEST_INSTANCE for JUnit3 tests
-// but different for JUnit4 tests
-private transient Object TEST_OBJECT = null;
+// but different for JUnit4 tests which use a wrapper
+private transient Object TEST_OBJECT;
+
+// The method name to be invoked
+private transient String methodName;
+// The name of the class containing the method
+private transient String className;
+// The wrapper used to invoke the method
+private transient Protectable protectable;
 
 public JUnitSampler(){
 }
@@ -93,20 +99,17 @@
  * @param testObject
  */
 private void initMethodObjects(Object testObject){
-if (!this.checkStartUpTearDown  !getDoNotSetUpTearDown()) {
-if (SETUP_METHOD == null) {
-SETUP_METHOD = getJunit4() ? 
-getMethodWithAnnotation(testObject, Before.class) 
-: 
-getMethod(testObject, SETUP);
-}
-if (TDOWN_METHOD == null) {
-TDOWN_METHOD = getJunit4() ?
-getMethodWithAnnotation(testObject, After.class)
-:
-getMethod(testObject, TEARDOWN);
-}
-this.checkStartUpTearDown = true;
+SETUP_METHOD = null;
+TDOWN_METHOD = null;
+if (!getDoNotSetUpTearDown()) {
+SETUP_METHOD = getJunit4() ? 
+getMethodWithAnnotation(testObject, Before.class) 
+: 
+getMethod(testObject, SETUP);
+TDOWN_METHOD = getJunit4() ?
+getMethodWithAnnotation(testObject, After.class)
+:
+getMethod(testObject, TEARDOWN);
 }
 }
 
@@ -352,188 +355,90 @@
 /** @{inheritDoc} */
 public SampleResult sample(Entry entry) {
 SampleResult sresult = new SampleResult();
-String rlabel = getConstructorString();
-if (rlabel.length()== 0) {
-rlabel = JUnitSampler.class.getName();
-}
 sresult.setSampleLabel(getName());// Bug 41522 - don't use rlabel here
-final String methodName = getMethod();
-final String className = getClassname();
 sresult.setSamplerData(className + . + methodName);
-// check to see if the test class is null. if it is, we create
-// a new instance. this should only happen at the start of a
-// test run
-if (this.TEST_OBJECT == null) {
-this.TEST_OBJECT = getClassInstance(className,rlabel);
-}
-if (this.TEST_OBJECT != null){
-

svn commit: r817694 - /jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java

2009-09-22 Thread sebb
Author: sebb
Date: Tue Sep 22 15:15:51 2009
New Revision: 817694

URL: http://svn.apache.org/viewvc?rev=817694view=rev
Log:
Rename mutable objects - only constants should be upper case

Modified:

jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java

Modified: 
jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java?rev=817694r1=817693r2=817694view=diff
==
--- 
jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java
 (original)
+++ 
jakarta/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/sampler/JUnitSampler.java
 Tue Sep 22 15:15:51 2009
@@ -74,15 +74,17 @@
 private static final String SETUP = setUp;
 private static final String TEARDOWN = tearDown;
 
-/// the Method objects for setUp and tearDown methods
-private transient Method SETUP_METHOD;
-private transient Method TDOWN_METHOD;
+// the Method objects for setUp (@Before) and tearDown (@After) methods
+// Will be null if not provided or not required
+private transient Method setUpMethod;
+private transient Method tearDownMethod;
 
 // The TestCase to run
-private transient TestCase TEST_INSTANCE;
-// The test object; same as TEST_INSTANCE for JUnit3 tests
+private transient TestCase testCase;
+// The test object, i.e. the instance of the class containing the test 
method
+// This is the same as testCase for JUnit3 tests
 // but different for JUnit4 tests which use a wrapper
-private transient Object TEST_OBJECT;
+private transient Object testObject;
 
 // The method name to be invoked
 private transient String methodName;
@@ -99,14 +101,14 @@
  * @param testObject
  */
 private void initMethodObjects(Object testObject){
-SETUP_METHOD = null;
-TDOWN_METHOD = null;
+setUpMethod = null;
+tearDownMethod = null;
 if (!getDoNotSetUpTearDown()) {
-SETUP_METHOD = getJunit4() ? 
+setUpMethod = getJunit4() ? 
 getMethodWithAnnotation(testObject, Before.class) 
 : 
 getMethod(testObject, SETUP);
-TDOWN_METHOD = getJunit4() ?
+tearDownMethod = getJunit4() ?
 getMethodWithAnnotation(testObject, After.class)
 :
 getMethod(testObject, TEARDOWN);
@@ -362,25 +364,25 @@
 sresult.setSuccessful(true);
 sresult.setResponseMessage(getSuccess());
 sresult.setResponseCode(getSuccessCode());
-if (this.TEST_INSTANCE != null){
+if (this.testCase != null){
 // create a new TestResult
 TestResult tr = new TestResult();
-final TestCase theClazz = this.TEST_INSTANCE;
+final TestCase theClazz = this.testCase;
 try {
-if (SETUP_METHOD != null){
-SETUP_METHOD.invoke(this.TEST_OBJECT,new Object[0]);
+if (setUpMethod != null){
+setUpMethod.invoke(this.testObject,new Object[0]);
 }
 sresult.sampleStart();
-tr.startTest(this.TEST_INSTANCE);
+tr.startTest(this.testCase);
 // Do not use TestCase.run(TestResult) method, since it will
 // call setUp and tearDown. Doing that will result in calling
 // the setUp and tearDown method twice and the elapsed time
 // will include setup and teardown.
 tr.runProtected(theClazz, protectable);
-tr.endTest(this.TEST_INSTANCE);
+tr.endTest(this.testCase);
 sresult.sampleEnd();
-if (TDOWN_METHOD != null){
-TDOWN_METHOD.invoke(TEST_OBJECT,new Object[0]);
+if (tearDownMethod != null){
+tearDownMethod.invoke(testObject,new Object[0]);
 }
 } catch (InvocationTargetException e) {
 Throwable cause = e.getCause();
@@ -560,7 +562,7 @@
 protected void runTest() throws Throwable {
 try {
 long start = System.currentTimeMillis();
-method.invoke(TEST_OBJECT, (Object[])null);
+method.invoke(testObject, (Object[])null);
 if (expectedException != None.class) {
 throw new AssertionFailedError(
 No error was generated for a test case which specifies an 
error.);
@@ -593,8 +595,8 @@
  * Set up all variables that don't change between samples.
  */
 public void threadStarted() {
-TEST_OBJECT = null;
-TEST_INSTANCE = null;
+testObject = null;
+testCase = null;
   

DO NOT REPLY [Bug 47886] Use ThreadPool for threads rather than create/start() with delay

2009-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47886

--- Comment #3 from Sebb s...@apache.org 2009-09-22 08:46:42 PDT ---
One alternative in your case is to re-use a single JMeter thread for multiple
users in succession. I.e. wrap the login, samples, logout sequence in a loop
controller.

You then set the total number of threads to the maximum concurrent users.

Which could be even cheaper than using a thread pool.

It may still be worth considering using a thread pool, but it's not clear if
this would break any existing tests.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 47886] Use ThreadPool for threads rather than create/start() with delay

2009-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47886

--- Comment #4 from Flick cflic...@novator.com 2009-09-22 08:53:39 PDT ---
Thanks for the suggestion, but it won't work in my case.  I need to simulate
new sessions being created by Tomcat which is unrelated to login/logout.  It's
related to a new user request, basically new context.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 47886] Use ThreadPool for threads rather than create/start() with delay

2009-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47886

--- Comment #5 from Sebb s...@apache.org 2009-09-22 08:59:13 PDT ---
In which case, just clear the context instead.

If you want to pursue this, please continue on the JMeter user list.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r817720 - /jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java

2009-09-22 Thread sebb
Author: sebb
Date: Tue Sep 22 16:34:23 2009
New Revision: 817720

URL: http://svn.apache.org/viewvc?rev=817720view=rev
Log:
No need to repeat what superclass implements

Modified:

jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java?rev=817720r1=817719r2=817720view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java
 Tue Sep 22 16:34:23 2009
@@ -50,7 +50,7 @@
  * user a username to use and pass the appropriate password.
  *
  */
-public class AuthManager extends ConfigTestElement implements ConfigElement, 
Serializable {
+public class AuthManager extends ConfigTestElement implements Serializable {
 private static final long serialVersionUID = 233L;
 
 private static final Logger log = LoggingManager.getLoggerForClass();



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r817724 - in /jakarta/jmeter/trunk: src/core/org/apache/jmeter/gui/util/MenuFactory.java src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java xdocs/changes.xml

2009-09-22 Thread sebb
Author: sebb
Date: Tue Sep 22 16:49:31 2009
New Revision: 817724

URL: http://svn.apache.org/viewvc?rev=817724view=rev
Log:
Disallow adding any child elements to JDBC Configuration
TestBeanGUI was using ConfigTestElement instead of ConfigElement
Also don't default to sampler menu if type not recognised

Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java

jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java
jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java?rev=817724r1=817723r2=817724view=diff
==
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java 
Tue Sep 22 16:49:31 2009
@@ -283,6 +283,13 @@
 return pop;
 }
 
+public static JPopupMenu getDefaultMenu() { // if type is unknown
+JPopupMenu pop = new JPopupMenu();
+MenuFactory.addEditMenu(pop, true);
+MenuFactory.addFileMenu(pop);
+return pop;
+}
+
 /**
  * Create a menu from a menu category.
  *

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java?rev=817724r1=817723r2=817724view=diff
==
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java 
(original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java 
Tue Sep 22 16:49:31 2009
@@ -38,7 +38,6 @@
 import org.apache.jmeter.assertions.Assertion;
 import org.apache.jmeter.assertions.gui.AbstractAssertionGui;
 import org.apache.jmeter.config.ConfigElement;
-import org.apache.jmeter.config.ConfigTestElement;
 import org.apache.jmeter.config.gui.AbstractConfigGui;
 import org.apache.jmeter.control.Controller;
 import org.apache.jmeter.control.gui.AbstractControllerGui;
@@ -279,7 +278,7 @@
 {
 return MenuFactory.getDefaultSamplerMenu();
 }
-else if(ConfigTestElement.class.isAssignableFrom(testBeanClass))
+else if(ConfigElement.class.isAssignableFrom(testBeanClass))
 {
 return MenuFactory.getDefaultConfigElementMenu();
 }
@@ -296,9 +295,14 @@
 {
 return MenuFactory.getDefaultVisualizerMenu();
 }
-else {
+else if(Controller.class.isAssignableFrom(testBeanClass))
+{
 return MenuFactory.getDefaultControllerMenu();
 }
+else {
+log.warn(Cannot determine PopupMenu for 
+testBeanClass.getName());
+return MenuFactory.getDefaultMenu();
+}
 }
 
 /*

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=817724r1=817723r2=817724view=diff
==
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Tue Sep 22 16:49:31 2009
@@ -101,6 +101,7 @@
 h3General/h3
 ul
 liBug 47646 -  NullPointerException in the Random Variable element/li
+liDisallow adding any child elements to JDBC Configuration/li
 /ul
 
 !--  --



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r817726 - /jakarta/jmeter/trunk/xdocs/changes.xml

2009-09-22 Thread sebb
Author: sebb
Date: Tue Sep 22 16:51:20 2009
New Revision: 817726

URL: http://svn.apache.org/viewvc?rev=817726view=rev
Log:
Junit4 support

Modified:
jakarta/jmeter/trunk/xdocs/changes.xml

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=817726r1=817725r2=817726view=diff
==
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Tue Sep 22 16:51:20 2009
@@ -116,6 +116,7 @@
 
 h3Other samplers/h3
 ul
+liJUnit sampler now supports JUnit4 tests (using annotations)/li
 /ul
 
 h3Controllers/h3



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



Re: svn commit: r816920 - in /jakarta/jmeter/trunk/lib: ./ api/ doc/

2009-09-22 Thread Rahul Akolkar
On Sat, Sep 19, 2009 at 9:19 AM,  s...@apache.org wrote:
 Author: sebb
 Date: Sat Sep 19 13:19:26 2009
 New Revision: 816920

 URL: http://svn.apache.org/viewvc?rev=816920view=rev
 Log:
 Drop jars that are downloadable elsewhere

snip/

Yes please, thanks :-)

-Rahul



 Removed:
    jakarta/jmeter/trunk/lib/api/geronimo-activation_1.0.2_spec-1.1.jar
    jakarta/jmeter/trunk/lib/api/geronimo-javamail_1.3.1_spec-1.1.jar
    jakarta/jmeter/trunk/lib/api/geronimo-jms_1.1_spec-1.0.jar
    jakarta/jmeter/trunk/lib/avalon-framework-4.1.4.jar
    jakarta/jmeter/trunk/lib/bsf-2.4.0.jar
    jakarta/jmeter/trunk/lib/bsh-2.0b4.jar
    jakarta/jmeter/trunk/lib/commons-codec-1.3.jar
    jakarta/jmeter/trunk/lib/commons-collections-3.2.jar
    jakarta/jmeter/trunk/lib/commons-httpclient-3.1.jar
    jakarta/jmeter/trunk/lib/commons-io-1.4.jar
    jakarta/jmeter/trunk/lib/commons-jexl-1.1.jar
    jakarta/jmeter/trunk/lib/commons-lang-2.4.jar
    jakarta/jmeter/trunk/lib/commons-logging-1.1.1.jar
    jakarta/jmeter/trunk/lib/commons-net-1.4.1.jar
    jakarta/jmeter/trunk/lib/doc/velocity-1.6.2.jar
    jakarta/jmeter/trunk/lib/excalibur-datasource-1.1.1.jar
    jakarta/jmeter/trunk/lib/excalibur-instrument-1.0.jar
    jakarta/jmeter/trunk/lib/excalibur-logger-1.1.jar
    jakarta/jmeter/trunk/lib/excalibur-pool-1.2.jar
    jakarta/jmeter/trunk/lib/htmllexer-2.0-20060923.jar
    jakarta/jmeter/trunk/lib/htmlparser-2.0-20060923.jar
    jakarta/jmeter/trunk/lib/jCharts-0.7.5.jar
    jakarta/jmeter/trunk/lib/jakarta-oro-2.0.8.jar
    jakarta/jmeter/trunk/lib/jdom-1.1.jar
    jakarta/jmeter/trunk/lib/js_rhino1_6R5.jar
    jakarta/jmeter/trunk/lib/junit3.8.2.jar
    jakarta/jmeter/trunk/lib/logkit-1.2.jar
    jakarta/jmeter/trunk/lib/serializer-2_9_1.jar
    jakarta/jmeter/trunk/lib/soap.jar
    jakarta/jmeter/trunk/lib/xalan_2_7_1.jar
    jakarta/jmeter/trunk/lib/xercesImpl-2_9_1.jar
    jakarta/jmeter/trunk/lib/xml-apis-2_9_1.jar
    jakarta/jmeter/trunk/lib/xmlgraphics-commons-1.3.1.jar
    jakarta/jmeter/trunk/lib/xpp3_min-1.1.4c.jar
    jakarta/jmeter/trunk/lib/xstream-1.3.1.jar



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 47886] Use ThreadPool for threads rather than create/start() with delay

2009-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47886

Flick cflic...@novator.com changed:

   What|Removed |Added

  Attachment #24300|0   |1
is obsolete||

--- Comment #6 from Flick cflic...@novator.com 2009-09-22 11:12:56 PDT ---
Created an attachment (id=24301)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=24301)
here is a patch for 2.3.4

Graceful shutdown maintained, although not sure that it works completely.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r817869 - /jakarta/jmeter/trunk/build.properties

2009-09-22 Thread sebb
Author: sebb
Date: Tue Sep 22 22:23:14 2009
New Revision: 817869

URL: http://svn.apache.org/viewvc?rev=817869view=rev
Log:
Document problem with JTidy

Modified:
jakarta/jmeter/trunk/build.properties

Modified: jakarta/jmeter/trunk/build.properties
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/build.properties?rev=817869r1=817868r2=817869view=diff
==
--- jakarta/jmeter/trunk/build.properties (original)
+++ jakarta/jmeter/trunk/build.properties Tue Sep 22 22:23:14 2009
@@ -140,10 +140,14 @@
 soap.md5= AA1845E01FEE94FE4A63BBCAA55AD486
 
 tidy.jar= Tidy.jar
+tidy.md5= 7256D79D8BA656A791926378E4ECF608
+
+# Unfortunately, the r820 release requires Java 1.6 (though it builds fine 
with Java 1.4) 
+# Cannot find a download for Java 1.5+ compatible version of tidy
+#tidy.jar= jtidy-r820.jar
 # Note: the trailing ? is a hack to ignore the appended jar name
 #tidy.loc= 
http://sourceforge.net/projects/jtidy/files/JTidy/r820/jtidy-r820.jar/download?
-# Unfortunately, r820 requires Java 1.6. Cannot find download for Java 1.5+ 
compatible version of tidy
-tidy.md5= 7256D79D8BA656A791926378E4ECF608
+#tidy.md5= 6BBE8D9E4A75A201754FC831CFCB177A
 
 # XStream can be found at: http://xstream.codehaus.org/
 xstream.jar = xstream-1.3.1.jar



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



Re: svn commit: r816920 - in /jakarta/jmeter/trunk/lib: ./ api/ doc/

2009-09-22 Thread sebb
On 22/09/2009, Rahul Akolkar rahul.akol...@gmail.com wrote:
 On Sat, Sep 19, 2009 at 9:19 AM,  s...@apache.org wrote:
   Author: sebb
   Date: Sat Sep 19 13:19:26 2009
   New Revision: 816920
  
   URL: http://svn.apache.org/viewvc?rev=816920view=rev
   Log:
   Drop jars that are downloadable elsewhere
  

 snip/

  Yes please, thanks :-)

Unfortunately there does not appear to be a version of JTidy that is
compatible with Java 1.5 (and which is no earlier than the current
version dated 2002/06/11). If you know of where to find a suitable
jar, please advise (N.B. jtidy-r820.jar requires Java 1.6, though it
appears to build fine with Java 1.4 ;-).


  -Rahul




   Removed:
  jakarta/jmeter/trunk/lib/api/geronimo-activation_1.0.2_spec-1.1.jar
  jakarta/jmeter/trunk/lib/api/geronimo-javamail_1.3.1_spec-1.1.jar
  jakarta/jmeter/trunk/lib/api/geronimo-jms_1.1_spec-1.0.jar
  jakarta/jmeter/trunk/lib/avalon-framework-4.1.4.jar
  jakarta/jmeter/trunk/lib/bsf-2.4.0.jar
  jakarta/jmeter/trunk/lib/bsh-2.0b4.jar
  jakarta/jmeter/trunk/lib/commons-codec-1.3.jar
  jakarta/jmeter/trunk/lib/commons-collections-3.2.jar
  jakarta/jmeter/trunk/lib/commons-httpclient-3.1.jar
  jakarta/jmeter/trunk/lib/commons-io-1.4.jar
  jakarta/jmeter/trunk/lib/commons-jexl-1.1.jar
  jakarta/jmeter/trunk/lib/commons-lang-2.4.jar
  jakarta/jmeter/trunk/lib/commons-logging-1.1.1.jar
  jakarta/jmeter/trunk/lib/commons-net-1.4.1.jar
  jakarta/jmeter/trunk/lib/doc/velocity-1.6.2.jar
  jakarta/jmeter/trunk/lib/excalibur-datasource-1.1.1.jar
  jakarta/jmeter/trunk/lib/excalibur-instrument-1.0.jar
  jakarta/jmeter/trunk/lib/excalibur-logger-1.1.jar
  jakarta/jmeter/trunk/lib/excalibur-pool-1.2.jar
  jakarta/jmeter/trunk/lib/htmllexer-2.0-20060923.jar
  jakarta/jmeter/trunk/lib/htmlparser-2.0-20060923.jar
  jakarta/jmeter/trunk/lib/jCharts-0.7.5.jar
  jakarta/jmeter/trunk/lib/jakarta-oro-2.0.8.jar
  jakarta/jmeter/trunk/lib/jdom-1.1.jar
  jakarta/jmeter/trunk/lib/js_rhino1_6R5.jar
  jakarta/jmeter/trunk/lib/junit3.8.2.jar
  jakarta/jmeter/trunk/lib/logkit-1.2.jar
  jakarta/jmeter/trunk/lib/serializer-2_9_1.jar
  jakarta/jmeter/trunk/lib/soap.jar
  jakarta/jmeter/trunk/lib/xalan_2_7_1.jar
  jakarta/jmeter/trunk/lib/xercesImpl-2_9_1.jar
  jakarta/jmeter/trunk/lib/xml-apis-2_9_1.jar
  jakarta/jmeter/trunk/lib/xmlgraphics-commons-1.3.1.jar
  jakarta/jmeter/trunk/lib/xpp3_min-1.1.4c.jar
  jakarta/jmeter/trunk/lib/xstream-1.3.1.jar
  
  

  -
  To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
  For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 47886] Use ThreadPool for threads rather than create/start() with delay

2009-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47886

Sebb s...@apache.org changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #7 from Sebb s...@apache.org 2009-09-22 16:20:55 PDT ---
Thanks for the replacement patch; it's easier to follow.

There are still some missing elements: for example, only the Scheduler delay is
supported, the absolute start time is ignored, as are the end-time and
duration. However these are easy to re-instate.

What I don't understand is why StandardJMeterEngine calls
jmeterThread.initRun() which creates and populates the context for the
JMeterThread. This seems wrong, as the context uses ThreadLocal, i.e. it will
return the context for the engine thread, not the execution thread.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 47888] New: JUnit Sampler re-uses test object

2009-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47888

   Summary: JUnit Sampler re-uses test object
   Product: JMeter
   Version: unspecified
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Main
AssignedTo: jmeter-dev@jakarta.apache.org
ReportedBy: s...@apache.org


The JUnit sampler currently re-uses the same test object for each sample.

This is not how JUnit tests work, as the test runner creates a new instance of
the test class for each test.

Re-using the instance means that tests such as the following contrived example
will fail if a sampler is run more than once in a loop:

private int i = 123;
public void testRerun(){
assertEquals(123,i);
i++;
}

The sampler needs to recreate the test instance for each sample.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 47888] JUnit Sampler re-uses test object

2009-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47888

--- Comment #1 from peter lin wool...@yahoo.com 2009-09-22 18:05:39 PDT ---
A couple of notes on the difference between jmeter's sampler and the standard
junit runner. For a stress test, we don't want to create a new instance of the
test class. When I originally wrote the junit sampler, it was for stress and
load testing. You can use it for unit testing, but it would require changing
how your unit test is written.

Cedric B of TestNG used to mention this design choice of JUnit as one of the
flaws. I got around the issue for stress testing by writing our own test
runner.

peter

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 47888] JUnit Sampler re-uses test object

2009-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47888

--- Comment #2 from Sebb s...@apache.org 2009-09-22 18:46:05 PDT ---
I see - good point.

It does mean that there are restrictions on the tests that can be run using
JMeter, but that's probably worth it - so it will be documented rather than
changed.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 47888] JUnit Sampler re-uses test object

2009-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47888

--- Comment #3 from peter lin wool...@yahoo.com 2009-09-22 18:55:37 PDT ---
A bit more information on how we used the junit sampler.

Our test cases were mainly for IBM Ascential's MetaData Server. The goal was to
load the database with x records using a predefined object graph and ETL data
in XML format.

The setup would load that data using our persistence API and then start to run
the stress test. One of the stress tests measured performance degradation as
the database size increases, so we needed to keep state.

If the sampler creates a new instance of the class, we loose state. To get
around that, the custom runner was needed. A compromise would be to add a
checkbox to create a new instance with each call. This way, the user has the
option of using the same instance or creating a new instance.

hope that info is useful.

peter

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 47890] New: WSDL data does not populate if web methods are too many.

2009-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47890

   Summary: WSDL data does not populate if web methods are too
many.
   Product: JMeter
   Version: 2.3.4
  Platform: PC
OS/Version: Windows Vista
Status: NEW
  Severity: critical
  Priority: P2
 Component: Main
AssignedTo: jmeter-dev@jakarta.apache.org
ReportedBy: apurv_an...@yahoo.com


If the web methods in a service are too many, the data (Web Methods, Protocol,
Server name/IP, Port, Path etc) does not populate.

Steps to reproduce:
- Create a test plan.
- Add Thread Group.
- Add Sampler - Web Service (SOAP) Request.
- Provide a WSDL URL (https://server/service.svc?wsdl)
- Click on Load WSDL

Results: Web methods are not populated.
Expected results: Web methods should get populated. 

Note: This bug only appears for services that have many web methods (I have 50+
methods).

This feature works fine for services with lesser number of methods (have
checked with services having 5-6 methods).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org