Merge pull request #3237 from lachlan-roberts/jetty-10.0.x-3236-CustomRequestLogTest_Failure

Issue #3236 - custom request log test failure
This commit is contained in:
Joakim Erdfelt 2019-01-08 15:51:48 -06:00 committed by GitHub
commit bedb8e2a75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -30,7 +30,6 @@ import java.util.Enumeration;
import java.util.Locale;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeUnit;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
@ -254,7 +253,9 @@ public class CustomRequestLogTest
_connector.getResponse("GET / HTTP/1.0\n\n");
String log = _entries.poll(5,TimeUnit.SECONDS);
assertThat(log, is("EnvironmentVar: " + System.getenv("JAVA_HOME") + ""));
String envVar = System.getenv("JAVA_HOME");
assertThat(log, is("EnvironmentVar: " + ((envVar==null) ? "-" : envVar)));
}
@Test