提交 0c9be2d4 编写于 作者: D dxu

8027624: com/sun/crypto/provider/KeyFactory/TestProviderLeak.java unstable again

Reviewed-by: wetmore
上级 0a0a0f0e
/* /*
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2013, 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
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
/* /*
* @test * @test
* @bug 6578538 * @bug 6578538 8027624
* @summary com.sun.crypto.provider.SunJCE instance leak using KRB5 and * @summary com.sun.crypto.provider.SunJCE instance leak using KRB5 and
* LoginContext * LoginContext
* @author Brad Wetmore * @author Brad Wetmore
...@@ -89,10 +89,6 @@ public class TestProviderLeak { ...@@ -89,10 +89,6 @@ public class TestProviderLeak {
} }
public static void main(String [] args) throws Exception { public static void main(String [] args) throws Exception {
// Eat up memory
Deque<byte []> dummyData = eatupMemory();
assert (dummyData != null);
// Prepare the test // Prepare the test
final SecretKeyFactory skf = final SecretKeyFactory skf =
SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1", "SunJCE"); SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1", "SunJCE");
...@@ -107,6 +103,10 @@ public class TestProviderLeak { ...@@ -107,6 +103,10 @@ public class TestProviderLeak {
} }
}; };
// Eat up memory
Deque<byte []> dummyData = eatupMemory();
assert (dummyData != null);
// Start testing iteration // Start testing iteration
try { try {
for (int i = 0; i <= 1000; i++) { for (int i = 0; i <= 1000; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册