mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-12 14:39:49 +00:00
8366941: Excessive logging in serviceability tests causes timeout
Reviewed-by: lmesnik, sspitsyn
This commit is contained in:
parent
b03b6f54c5
commit
d21e73dee3
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2025, 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
|
||||
@ -36,7 +36,7 @@ import jdk.test.lib.process.OutputAnalyzer;
|
||||
public class TestBasicLogOutput {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder("-Xlog:all=trace", "-version");
|
||||
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder("-Xlog:all=info", "-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldMatch("\\[logging *\\]"); // expected tag(s)
|
||||
output.shouldContain("Log configuration fully initialized."); // expected message
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2019, 2025, 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
|
||||
@ -64,7 +64,7 @@ public class TestFullNames {
|
||||
Asserts.assertFalse(file.exists());
|
||||
// Run with logging=trace on stdout so that we can verify the log configuration afterwards.
|
||||
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder("-Xlog:logging=trace",
|
||||
"-Xlog:all=trace:" + logOutput,
|
||||
"-Xlog:all=info:" + logOutput,
|
||||
"-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldHaveExitValue(0);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2025, 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
|
||||
@ -74,7 +74,7 @@ public class TestQuotedLogOutputs {
|
||||
for (String logOutput : validOutputs) {
|
||||
// Run with logging=trace on stdout so that we can verify the log configuration afterwards.
|
||||
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder("-Xlog:logging=trace",
|
||||
"-Xlog:all=trace:" + logOutput,
|
||||
"-Xlog:all=info:" + logOutput,
|
||||
"-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldHaveExitValue(0);
|
||||
@ -99,7 +99,7 @@ public class TestQuotedLogOutputs {
|
||||
};
|
||||
for (String logOutput : invalidOutputs) {
|
||||
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder("-Xlog:logging=trace",
|
||||
"-Xlog:all=trace:" + logOutput,
|
||||
"-Xlog:all=info:" + logOutput,
|
||||
"-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldHaveExitValue(1);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user