Closed georgejdli closed 3 months ago
Hey @georgejdli
Thanks for bringing up this issue. I have never tested this on distributed testing. Will give it a try and fix it at the earliest
Thanks
I'm not sure if there's a more robust way to determine if Jmeter is running in server mode but this is my quick fix to get the plugin working in distributed mode. The system property server_port
will always be set for my use case so I do a check for that.
private boolean isServerMode() {
return System.getProperty("server_port") != null;
}
@Override
public void testStarted() {
FileServerExtended fileServer = FileServerExtended.getFileServer();
if(JMeter.isNonGUI() || isServerMode()){
String baseDirectory = org.apache.jmeter.services.FileServer.getFileServer().getBaseDir();
fileServer.setBasedir(baseDirectory);
}else {
String testPlanFile = GuiPackage.getInstance().getTestPlanFile();
fileServer.setBasedir(testPlanFile);
}
}
Hey that is what I thought of doing it - Its like i am re-inventing the wheel :P Can you just do a Pull request ? contributions are always welcome mate !
Hey that is what I thought of doing it - Its like i am re-inventing the wheel :P Can you just do a Pull request ? contributions are always welcome mate !
I have opened a PR
Apologies, I was busy away... Thanks for the PR - I will merge it tomorrow
Thanks again
Fixes were merged to master and release has been published to plugins manager (2.2) Thanks @georgejdli for the contribution
Do support us by hitting star and feel free to open up issues if you experience a bug If you have ideas - please feel free to create a feature request :)
(Thanks for creating and supporting this plugin!)
How to replicate: run jmeter in distributed mode
bin/jmeter-server -Dserver.rmi.localport=50000 -Dserver_port=1099
The error message
source code
2024-03-05 23:23:16,510 INFO o.a.j.p.j.s.J.JSR223 Sampler: JMeter.NonGui: null