jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1855129 - /jmeter/trunk/test/src/org/apache/jmeter/functions/TestSimpleFunctions.java
Date Sat, 09 Mar 2019 16:50:28 GMT
Author: pmouawad
Date: Sat Mar  9 16:50:28 2019
New Revision: 1855129

URL: http://svn.apache.org/viewvc?rev=1855129&view=rev
Log:
Bug 63241 - __threadGroupName causes a NullPointerException if called from non Test threads

Make test hypothesis clear to avoid failures when tests run in parallel
Bugzilla Id: 63241

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/functions/TestSimpleFunctions.java

Modified: jmeter/trunk/test/src/org/apache/jmeter/functions/TestSimpleFunctions.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/functions/TestSimpleFunctions.java?rev=1855129&r1=1855128&r2=1855129&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/functions/TestSimpleFunctions.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/functions/TestSimpleFunctions.java Sat Mar  9
16:50:28 2019
@@ -197,6 +197,8 @@ public class TestSimpleFunctions extends
         try {
             HTTPSamplerProxy httpRequest = new HTTPSamplerProxy();
             JMeterContext context = JMeterContextService.getContext();
+            // This is the state when called from a non test thread
+            context.setThreadGroup(null);
             context.setCurrentSampler(httpRequest);
             String ret = function.execute(result, httpRequest);
             assertEquals("", ret);



Mime
View raw message