Skip to content

Commit

Permalink
Issue #3236 - fixed CustomRequestLogTest failure when JAVA_HOME not set
Browse files Browse the repository at this point in the history
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
  • Loading branch information
lachlan-roberts authored and joakime committed Jan 15, 2019
1 parent 027a91d commit 2fc6185
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
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;
Expand Down Expand Up @@ -254,7 +253,9 @@ public void testLogEnvironmentVar() throws Exception

_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
Expand Down

0 comments on commit 2fc6185

Please sign in to comment.