Skip to content

Commit b9d7a75

Browse files
linzihao1999SendaoYan
authored andcommitted
8352879: TestPeriod.java and TestGetContentType.java run wrong test class
Reviewed-by: mgronlun
1 parent 895aabc commit b9d7a75

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/jdk/jdk/jfr/api/metadata/annotations/TestPeriod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* @requires vm.flagless
3535
* @requires vm.hasJFR
3636
* @library /test/lib
37-
* @run main/othervm jdk.jfr.api.metadata.annotations.TestLabel
37+
* @run main/othervm jdk.jfr.api.metadata.annotations.TestPeriod
3838
*/
3939
public class TestPeriod {
4040

test/jdk/jdk/jfr/api/metadata/settingdescriptor/TestGetContentType.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* @requires vm.flagless
3939
* @requires vm.hasJFR
4040
* @library /test/lib /test/jdk
41-
* @run main/othervm jdk.jfr.api.metadata.settingdescriptor.TestGetDescription
41+
* @run main/othervm jdk.jfr.api.metadata.settingdescriptor.TestGetContentType
4242
*/
4343
public class TestGetContentType {
4444

@@ -49,7 +49,7 @@ public static void main(String[] args) throws Exception {
4949
Asserts.assertNull(plain.getContentType());
5050

5151
SettingDescriptor annotatedType = Events.getSetting(type, "annotatedType");
52-
Asserts.assertNull(annotatedType.getContentType(), Timestamp.class.getName());
52+
Asserts.assertEquals(annotatedType.getContentType(), Timestamp.class.getName());
5353

5454
SettingDescriptor newName = Events.getSetting(type, "newName");
5555
Asserts.assertEquals(newName.getContentType(), Timespan.class.getName());
@@ -58,7 +58,7 @@ public static void main(String[] args) throws Exception {
5858
Asserts.assertNull(overridden.getContentType());
5959

6060
SettingDescriptor protectedBase = Events.getSetting(type, "protectedBase");
61-
Asserts.assertEquals(protectedBase.getContentType(), Frequency.class);
61+
Asserts.assertEquals(protectedBase.getContentType(), Frequency.class.getName());
6262

6363
SettingDescriptor publicBase = Events.getSetting(type, "publicBase");
6464
Asserts.assertEquals(publicBase.getContentType(), Timestamp.class.getName());

0 commit comments

Comments
 (0)