Skip to content

Commit b9d3f12

Browse files
committed
waiting for all tests to run before skipping
1 parent 867b81d commit b9d3f12

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/jdk/sun/security/pkcs11/SecretKeyFactory/TestGeneral.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
import java.security.NoSuchAlgorithmException;
3636
import java.security.Provider;
3737
import java.security.SecureRandom;
38+
import java.util.ArrayList;
3839
import java.util.Arrays;
40+
import java.util.List;
3941
import javax.crypto.SecretKeyFactory;
4042
import javax.crypto.SecretKey;
4143
import javax.crypto.spec.SecretKeySpec;
@@ -104,6 +106,7 @@ public void main(Provider p) throws Exception {
104106
SecretKey bf_128Key = new SecretKeySpec(rawBytes, 0, 16, "Blowfish");
105107
SecretKey cc20Key = new SecretKeySpec(rawBytes, 0, 32, "ChaCha20");
106108

109+
List<String> skippedList = new ArrayList<>();
107110
try {
108111
// fixed key length
109112
test("AES", aes_128Key, p, TestResult.PASS);
@@ -122,7 +125,11 @@ public void main(Provider p) throws Exception {
122125
test("Blowfish", cc20Key, p, TestResult.FAIL);
123126
test("Blowfish", bf_128Key, p, TestResult.PASS);
124127
} catch (SkippedException skippedException){
125-
throw new SkippedException("One or more tests skipped");
128+
skippedList.add(skippedException.getMessage());
129+
}
130+
131+
if (!skippedList.isEmpty()) {
132+
throw new SkippedException("One or more tests skipped " + skippedList);
126133
}
127134
}
128135
}

0 commit comments

Comments
 (0)