Issue #3236 - fixed CustomRequestLogTest failure when JAVA_HOME not set

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2019-01-04 09:36:53 +11:00 committed by Joakim Erdfelt
parent 027a91d224
commit 2fc6185c29
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.Locale;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@ -254,7 +253,9 @@ public class CustomRequestLogTest
_connector.getResponse("GET / HTTP/1.0\n\n"); _connector.getResponse("GET / HTTP/1.0\n\n");
String log = _entries.poll(5,TimeUnit.SECONDS); 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 @Test