Skip to content

Commit

Permalink
8292064: Convert java/lang/management/MemoryMXBean shell tests to jav…
Browse files Browse the repository at this point in the history
…a version

Reviewed-by: lmesnik, sspitsyn
  • Loading branch information
bwhuang-us authored and lmesnik committed Aug 11, 2022
1 parent fc1d94e commit 7ea9ba1
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 309 deletions.
20 changes: 19 additions & 1 deletion test/jdk/java/lang/management/MemoryMXBean/LowMemoryTest2.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2022, 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
Expand Down Expand Up @@ -31,6 +31,24 @@
* is generated.
*/

/*
* @test
* @bug 4982128
* @summary Test low memory detection of non-heap memory pool
*
* @run main/othervm/timeout=600 -noclassgc -XX:MaxMetaspaceSize=32m
* LowMemoryTest2
*/

/*
* @test
* @bug 4982128
* @summary Test low memory detection of non-heap memory pool
*
* @run main/othervm/timeout=600 -noclassgc -XX:MaxMetaspaceSize=16m
* -XX:CompressedClassSpaceSize=4m LowMemoryTest2
*/

import java.lang.management.*;
import javax.management.*;
import javax.management.openmbean.CompositeData;
Expand Down
80 changes: 0 additions & 80 deletions test/jdk/java/lang/management/MemoryMXBean/LowMemoryTest2.sh

This file was deleted.

23 changes: 20 additions & 3 deletions test/jdk/java/lang/management/MemoryMXBean/MemoryManagement.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2022, 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
Expand Down Expand Up @@ -30,9 +30,26 @@
*
* @author Mandy Chung
*
* @requires vm.gc == null | vm.gc == "G1"
*
* @modules jdk.management
* @build MemoryManagement MemoryUtil
* @run main/othervm/timeout=600 -Xmn8m -XX:+IgnoreUnrecognizedVMOptions -XX:G1HeapRegionSize=1 -XX:-UseLargePages MemoryManagement
*
* @run main/othervm/timeout=600 -Xmn8m -XX:+IgnoreUnrecognizedVMOptions
* -XX:G1HeapRegionSize=1 -XX:-UseLargePages MemoryManagement
*/

/*
* @test
* @bug 4530538 6980984
* @summary Basic unit test of memory management testing:
* 1) setUsageThreshold() and getUsageThreshold()
* 2) test low memory detection on the old generation.
*
* @author Mandy Chung
*
* @modules jdk.management
*
* @run main/timeout=600 MemoryManagement
*/

import java.lang.management.*;
Expand Down

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion test/jdk/java/lang/management/MemoryMXBean/MemoryTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2022, 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
Expand Down
58 changes: 0 additions & 58 deletions test/jdk/java/lang/management/MemoryMXBean/MemoryTestAllGC.sh

This file was deleted.

4 changes: 3 additions & 1 deletion test/jdk/java/lang/management/MemoryMXBean/Pending.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2022, 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
Expand Down Expand Up @@ -35,6 +35,8 @@
*
* @modules java.base/jdk.internal.misc
* java.management
*
* @run main Pending
*/

import java.lang.management.*;
Expand Down
57 changes: 0 additions & 57 deletions test/jdk/java/lang/management/MemoryMXBean/PendingAllGC.sh

This file was deleted.

1 comment on commit 7ea9ba1

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.