Skip to content

Commit 966d3ab

Browse files
committed
fix tests for windows
1 parent b810543 commit 966d3ab

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

dropwizard-guicey/src/main/java/ru/vyarus/dropwizard/guice/test/client/builder/track/RequestData.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package ru.vyarus.dropwizard.guice.test.client.builder.track;
22

33
import com.google.common.collect.ImmutableList;
4+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
45
import jakarta.ws.rs.client.Entity;
56
import jakarta.ws.rs.core.CacheControl;
67
import jakarta.ws.rs.core.Cookie;
@@ -483,8 +484,9 @@ private String getCallSource() {
483484
return StackUtils.getCallerSource(INFRA);
484485
}
485486

487+
@SuppressFBWarnings("VA_FORMAT_STRING_USES_NEWLINE")
486488
private void trace(final String title, final String value, final String source) {
487-
log.append(String.format("\t%-40s %s%n\t\t%s%n%n", title, source == null ? "" : source,
489+
log.append(String.format("\t%-40s %s\n\t\t%s\n\n", title, source == null ? "" : source,
488490
value.startsWith(DBL_TAB) ? value.substring(2) : value));
489491
}
490492

dropwizard-guicey/src/test/groovy/ru/vyarus/dropwizard/guice/test/client/ClientResponseTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ void testFileDownload(ClientSupport client) {
250250
// WHEN jersey file download (temp)
251251
File res = rest.method(FileResource::download).as(File.class);
252252
System.out.println(res.getAbsolutePath());
253-
assertThat(res.getAbsolutePath()).startsWith("/tmp");
253+
String tmp = System.getProperty("java.io.tmpdir");
254+
assertThat(res.getAbsolutePath()).startsWith(tmp);
254255
assertThat(res.getName()).isNotEqualTo("logback.xml");
255256

256257
// WHEN file download api

0 commit comments

Comments
 (0)