We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40755af commit f1c5041Copy full SHA for f1c5041
test/lib/jdk/test/lib/containers/cgroup/MetricsTesterCgroupV2.java
@@ -121,7 +121,8 @@ private long getLongValueFromFile(String file) {
121
private long getLongValueEntryFromFile(String file, String metric) {
122
Path filePath = Paths.get(UNIFIED.getPath(), file);
123
try {
124
- String strVal = Files.lines(filePath).filter(l -> l.startsWith(metric)).collect(Collectors.joining());
+ String strVal = Files.lines(filePath)
125
+ .filter(l -> l.matches("^" + metric + "\\s+.*")).collect(Collectors.joining());
126
if (strVal.isEmpty()) {
127
// sometimes the match for the metric does not exist, e.g. cpu.stat's nr_periods iff the controller
128
// is not enabled
0 commit comments