8316415: Parallelize sun/security/rsa/SignedObjectChain.java subtests
Reviewed-by: shade, rhalade, valeriep
This commit is contained in:
parent
eeb63cd0fa
commit
59847926b6
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -21,6 +21,8 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 8050374 8146293
|
* @bug 8050374 8146293
|
||||||
@ -31,7 +33,6 @@
|
|||||||
* @summary Verify a chain of signed objects
|
* @summary Verify a chain of signed objects
|
||||||
*/
|
*/
|
||||||
public class SignedObjectChain {
|
public class SignedObjectChain {
|
||||||
|
|
||||||
private static class Test extends Chain.Test {
|
private static class Test extends Chain.Test {
|
||||||
|
|
||||||
public Test(Chain.SigAlg sigAlg) {
|
public Test(Chain.SigAlg sigAlg) {
|
||||||
@ -52,10 +53,9 @@ public class SignedObjectChain {
|
|||||||
};
|
};
|
||||||
|
|
||||||
public static void main(String argv[]) {
|
public static void main(String argv[]) {
|
||||||
boolean resutl = java.util.Arrays.stream(tests).allMatch(
|
boolean result = Arrays.stream(tests).parallel().allMatch(Chain::runTest);
|
||||||
(test) -> Chain.runTest(test));
|
|
||||||
|
|
||||||
if(resutl) {
|
if (result) {
|
||||||
System.out.println("All tests passed");
|
System.out.println("All tests passed");
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException("Some tests failed");
|
throw new RuntimeException("Some tests failed");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user