8027624: com/sun/crypto/provider/KeyFactory/TestProviderLeak.java unstable again
authordxu
Fri, 01 Nov 2013 14:40:03 -0700
changeset 21603 e88919c55dac
parent 21602 85bdffaf5e5d
child 21604 2ad6b165b7d8
8027624: com/sun/crypto/provider/KeyFactory/TestProviderLeak.java unstable again Reviewed-by: wetmore
jdk/test/com/sun/crypto/provider/KeyFactory/TestProviderLeak.java
--- a/jdk/test/com/sun/crypto/provider/KeyFactory/TestProviderLeak.java	Fri Nov 01 15:10:10 2013 +0100
+++ b/jdk/test/com/sun/crypto/provider/KeyFactory/TestProviderLeak.java	Fri Nov 01 14:40:03 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * 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.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6578538
+ * @bug 6578538 8027624
  * @summary com.sun.crypto.provider.SunJCE instance leak using KRB5 and
  *     LoginContext
  * @author Brad Wetmore
@@ -89,10 +89,6 @@
     }
 
     public static void main(String [] args) throws Exception {
-        // Eat up memory
-        Deque<byte []> dummyData = eatupMemory();
-        assert (dummyData != null);
-
         // Prepare the test
         final SecretKeyFactory skf =
             SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1", "SunJCE");
@@ -107,6 +103,10 @@
             }
         };
 
+        // Eat up memory
+        Deque<byte []> dummyData = eatupMemory();
+        assert (dummyData != null);
+
         // Start testing iteration
         try {
             for (int i = 0; i <= 1000; i++) {