Skip to content

Commit

Permalink
fix: isNonGUI doesn't work for distributed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Li, George (gl741q) committed Mar 7, 2024
1 parent 0f840d0 commit 2fe8982
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,14 @@ private void setAlias(final JMeterContext context, String alias) {
}
}

private boolean isServerMode() {
return System.getProperty("server_port") != null;
}

@Override
public void testStarted() {
FileServerExtended fileServer = FileServerExtended.getFileServer();
if(JMeter.isNonGUI()){
if(JMeter.isNonGUI() || isServerMode()){
String baseDirectory = org.apache.jmeter.services.FileServer.getFileServer().getBaseDir();
fileServer.setBasedir(baseDirectory);
}else {
Expand Down

0 comments on commit 2fe8982

Please sign in to comment.