JDK-7064045 : Fix CacheUpgradeTest failures on UNIX
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 7-client
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-07-07
  • Updated: 2011-11-28
  • Resolved: 2011-11-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u2 b03Fixed 8Fixed
Description
Various unit test failure on amd64-linux machine:
java.io.FileNotFoundException: /tmp/deployCache7670342454985544680.private/6.0/21/75664cd5-176c9df0 (No such file or directory)
    [junit] 	at java.util.zip.ZipFile.open(Native Method)
    [junit] 	at java.util.zip.ZipFile.<init>(ZipFile.java:214)
    [junit] 	at java.util.zip.ZipFile.<init>(ZipFile.java:144)
    [junit] 	at java.util.jar.JarFile.<init>(JarFile.java:152)
    [junit] 	at java.util.jar.JarFile.<init>(JarFile.java:131)
    [junit] 	at com.sun.deploy.cache.CachedJarFile.<init>(Unknown Source)
    [junit] 	at com.sun.deploy.cache.CacheEntry$4.run(Unknown Source)
    [junit] 	at java.security.AccessController.doPrivileged(Native Method)
    [junit] 	at com.sun.deploy.cache.CacheEntry.getJarFile(Unknown Source)
    [junit] 	at com.sun.deploy.cache.CacheTest.testCreateRedirectEntry(Unknown Source)
    [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    [junit] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [junit] 	at java.lang.reflect.Method.invoke(Method.java:601)
    [junit] 	at junit.framework.TestCase.runTest(TestCase.java:168)
    [junit] 	at junit.framework.TestCase.runBare(TestCase.java:134)
    [junit] 	at sun.tests.junit.DeployTestCase.runBare(Unknown Source)
    [junit] 	at junit.framework.TestResult$1.protect(TestResult.java:110)
    [junit] 	at junit.framework.TestResult.runProtected(TestResult.java:128)
    [junit] 	at junit.framework.TestResult.run(TestResult.java:113)
    [junit] 	at junit.framework.TestCase.run(TestCase.java:124)
    [junit] 	at junit.framework.TestSuite.runTest(TestSuite.java:232)
    [junit] 	at junit.framework.TestSuite.run(TestSuite.java:227)
    [junit] 	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
    [junit] 	at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:36)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:420)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:743)
    [junit] ------------- ---------------- ---------------
    [junit] Running com.sun.deploy.cache.CacheUpgraderTest
    [junit] Testsuite: com.sun.deploy.cache.CacheUpgraderTest
    [junit] Tests run: 19, Failures: 1, Errors: 4, Time elapsed: 0.302 sec
    [junit] Tests run: 19, Failures: 1, Errors: 4, Time elapsed: 0.302 sec
    [junit] 
    [junit] Testcase: testNoOldNoop(com.sun.deploy.cache.CacheUpgraderTest):	Caused an ERROR
    [junit] null
    [junit] java.lang.NullPointerException
    [junit] 	at java.io.File.<init>(File.java:251)
    [junit] 	at com.sun.deploy.cache.CacheUpgrader.getSystemInstance(Unknown Source)
    [junit] 	at com.sun.deploy.cache.CacheUpgraderTest.testNoOldNoop(Unknown Source)
    [junit] 	at sun.tests.junit.DeployTestCase.runBare(Unknown Source)
    [junit] 
    [junit] 
    [junit] Testcase: testOldCacheDirExistsNormalUpgrade(com.sun.deploy.cache.CacheUpgraderTest):	Caused an ERROR
    [junit] null
    [junit] java.lang.NullPointerException
    [junit] 	at com.sun.deploy.cache.CacheUpgraderTest.testOldCacheDirExistsNormalUpgrade(Unknown Source)
    [junit] 	at sun.tests.junit.DeployTestCase.runBare(Unknown Source)
    [junit] 
    [junit] 
    [junit] Testcase: testUpgradeCompletedNoop(com.sun.deploy.cache.CacheUpgraderTest):	Caused an ERROR
    [junit] null
    [junit] java.lang.NullPointerException
    [junit] 	at com.sun.deploy.cache.CacheUpgraderTest.runUpgradeCompletedNoop(Unknown Source)
    [junit] 	at com.sun.deploy.cache.CacheUpgraderTest.testUpgradeCompletedNoop(Unknown Source)
    [junit] 	at sun.tests.junit.DeployTestCase.runBare(Unknown Source)
    [junit] 
    [junit] 
    [junit] Testcase: testUpgradeExceedCountNoop(com.sun.deploy.cache.CacheUpgraderTest):	Caused an ERROR
    [junit] null
    [junit] java.lang.NullPointerException
    [junit] 	at com.sun.deploy.cache.CacheUpgraderTest.runUpgradeExceedCountNoop(Unknown Source)
    [junit] 	at com.sun.deploy.cache.CacheUpgraderTest.testUpgradeExceedCountNoop(Unknown Source)
    [junit] 	at sun.tests.junit.DeployTestCase.runBare(Unknown Source)
    [junit] 
    [junit] 
    [junit] Testcase: testUpgrade(com.sun.deploy.cache.CacheUpgraderTest):	FAILED
    [junit] Incorrect upgrade timestamp
    [junit] junit.framework.AssertionFailedError: Incorrect upgrade timestamp
    [junit] 	at com.sun.deploy.cache.CacheUpgraderTest.runTestUpgrade(Unknown Source)
    [junit] 	at com.sun.deploy.cache.CacheUpgraderTest.testUpgrade(Unknown Source)
    [junit] 	at sun.tests.junit.DeployTestCase.runBare(Unknown Source)
    [junit] 
    [junit] 
    [junit] TEST com.sun.deploy.cache.CacheUpgraderTest FAILED

Comments
EVALUATION Fix by handle null value returned from UnixPlatform.getDefaultSystemCache(), and empty string return come back from windows registry.
2011-07-08