mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-26 18:20:28 +00:00
8224502: [TESTBUG] JDK docker test TestSystemMetrics.java fails with access issues and OOM
Reviewed-by: sgehwolf, mseledtsov
This commit is contained in:
parent
6ad9eba4cd
commit
4786d88ba9
@ -878,4 +878,3 @@ jdk/jfr/event/io/EvilInstrument.java 8221331 gener
|
||||
# jdk/internal/docker
|
||||
|
||||
jdk/internal/platform/docker/TestDockerMemoryMetrics.java 8224506 generic-all
|
||||
jdk/internal/platform/docker/TestSystemMetrics.java 8224502 generic-all
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -51,6 +51,7 @@ public class TestSystemMetrics {
|
||||
DockerRunOptions opts =
|
||||
new DockerRunOptions(imageName, "/jdk/bin/java", "jdk.test.lib.containers.cgroup.MetricsTester");
|
||||
opts.addDockerOpts("--volume", Utils.TEST_CLASSES + ":/test-classes/");
|
||||
opts.addDockerOpts("--memory=256m");
|
||||
opts.addJavaOpts("-cp", "/test-classes/");
|
||||
opts.addJavaOpts("--add-exports", "java.base/jdk.internal.platform=ALL-UNNAMED");
|
||||
DockerTestUtils.dockerRunJava(opts).shouldHaveExitValue(0).shouldContain("TEST PASSED!!!");
|
||||
|
||||
@ -560,7 +560,7 @@ public class MetricsTester {
|
||||
long memoryMaxUsage = metrics.getMemoryMaxUsage();
|
||||
long memoryUsage = metrics.getMemoryUsage();
|
||||
|
||||
long[] ll = new long[64*1024*1024]; // 64M
|
||||
byte[] bb = new byte[64*1024*1024]; // 64M
|
||||
|
||||
long newMemoryMaxUsage = metrics.getMemoryMaxUsage();
|
||||
long newMemoryUsage = metrics.getMemoryUsage();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user