United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7064045 : Fix CacheUpgradeTest failures on UNIX

Details
Type:
Bug
Submit Date:
2011-07-07
Status:
Closed
Updated Date:
2011-11-28
Project Name:
JDK
Resolved Date:
2011-11-28
Component:
deploy
OS:
generic
Sub-Component:
deployment_toolkit
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7-client
Fixed Versions:
7u2 (b03)

Related Reports
Backport:

Sub Tasks

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



Hardware and Software, Engineered to Work Together