Skip to content

Commit

Permalink
8324220: jdk/jfr/event/io/TestSerializationMisdeclarationEvent.java h…
Browse files Browse the repository at this point in the history
…ad 22 failures

Reviewed-by: egahlin
  • Loading branch information
rgiulietti committed Jan 24, 2024
1 parent bccd823 commit 00bb6bf
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions test/jdk/jdk/jfr/event/io/TestSerializationMisdeclarationEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,21 @@

package jdk.jfr.event.io;

import jdk.jfr.Recording;
import jdk.jfr.consumer.RecordedEvent;
import jdk.jfr.consumer.RecordingStream;
import jdk.test.lib.jfr.Events;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectStreamClass;
import java.io.ObjectStreamField;
import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

Expand All @@ -46,7 +47,7 @@

/*
* @test
* @bug 8275338
* @bug 8275338 8324220
* @summary Check generation of JFR events for misdeclared fields and methods
* relevant to serialization
* @key jfr
Expand All @@ -56,16 +57,16 @@
*/
public class TestSerializationMisdeclarationEvent {

private static final List<RecordedEvent> events = new ArrayList<>();
private static List<RecordedEvent> events;

@BeforeAll
static void recordEvents() {
try (var rs = new RecordingStream()) {
rs.enable(SerializationMisdeclaration);
rs.onEvent(SerializationMisdeclaration, events::add);
rs.startAsync();
static void recordEvents() throws IOException {
try (Recording r = new Recording()) {
r.enable(SerializationMisdeclaration);
r.start();
doLookups();
rs.stop();
r.stop();
events = Events.fromRecording(r);
}
}

Expand Down

1 comment on commit 00bb6bf

@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.