|
7 | 7 | import java.io.IOException;
|
8 | 8 | import java.net.MalformedURLException;
|
9 | 9 | import java.net.URL;
|
| 10 | +import java.text.DecimalFormat; |
10 | 11 | import java.text.NumberFormat;
|
11 | 12 |
|
12 | 13 | import com.tagtraum.perf.gcviewer.exp.impl.SummaryDataWriter;
|
|
19 | 20 | import com.tagtraum.perf.gcviewer.model.GCModel;
|
20 | 21 | import com.tagtraum.perf.gcviewer.model.GcResourceFile;
|
21 | 22 | import com.tagtraum.perf.gcviewer.util.MemoryFormat;
|
22 |
| - |
23 | 23 | import org.hamcrest.Matchers;
|
24 | 24 | import org.junit.BeforeClass;
|
25 | 25 | import org.junit.Test;
|
@@ -170,11 +170,14 @@ public void testWriteWithZGCPhases() throws IOException {
|
170 | 170 |
|
171 | 171 | String csv = output.toString();
|
172 | 172 |
|
173 |
| - assertThat("pausePercentile75th", csv, Matchers.containsString("pausePercentile75th; 0,000934; s")); |
174 |
| - assertThat("gcPausePercentile95th", csv, Matchers.containsString("gcPausePercentile95th; 0,000934; s")); |
| 173 | + // use locale specific decimalSeparator to check, if the right values are present |
| 174 | + char decimalSeparator = new DecimalFormat().getDecimalFormatSymbols().getDecimalSeparator(); |
| 175 | + |
| 176 | + assertThat("pausePercentile75th", csv, Matchers.containsString("pausePercentile75th; 0" + decimalSeparator + "000934; s")); |
| 177 | + assertThat("gcPausePercentile95th", csv, Matchers.containsString("gcPausePercentile95th; 0" + decimalSeparator + "000934; s")); |
175 | 178 | assertThat("pauseCount", csv, Matchers.containsString("pauseCount; 1; -"));
|
176 | 179 | assertThat("gcPhaseCount", csv, Matchers.containsString("gcPhaseCount; 3; -"));
|
177 |
| - assertThat("gcPhaseAverage", csv, Matchers.containsString("gcPhaseAverage; 0,000311; s")); |
178 |
| - assertThat("gcPhasePercentile99th", csv, Matchers.containsString("gcPhasePercentile99th; 0,000499; s")); |
| 180 | + assertThat("gcPhaseAverage", csv, Matchers.containsString("gcPhaseAverage; 0" + decimalSeparator + "000311; s")); |
| 181 | + assertThat("gcPhasePercentile99th", csv, Matchers.containsString("gcPhasePercentile99th; 0" + decimalSeparator + "000499; s")); |
179 | 182 | }
|
180 | 183 | }
|
0 commit comments