This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 18223 - Test failures from fs unit tests
Summary: Test failures from fs unit tests
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 3.x
Hardware: PC Linux
: P4 blocker (vote)
Assignee: rmatous
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2001-11-30 12:19 UTC by Jesse Glick
Modified: 2008-12-22 18:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2001-11-30 12:19:56 UTC
In [r33 nov 30], LocalFileSystemTest and MultiFileSystem{1,2,3}Test all get two
failures each, e.g.:

Failures Details

testLastModified

junit.framework.AssertionFailedError: Unexpected time of lastModification 
[class org.openide.filesystems.LocalFileSystemTest]
        at junit.framework.Assert.fail(Assert.java:51)
        at junit.framework.Assert.assert(Assert.java:20)
        at org.openide.filesystems.TestBaseHid.fsAssert(TestBaseHid.java:80)
        at
org.openide.filesystems.FileObjectTestHid.testLastModified(FileObjectTestHid.java:553)
        at java.lang.reflect.Method.invoke(Native Method)
        at junit.framework.TestCase.runTest(TestCase.java:166)
        at junit.framework.TestCase.runBare(TestCase.java:140)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:131)
        at org.netbeans.junit.NbTestCase.run(NbTestCase.java:76)
        at
org.openide.filesystems.MultiThreadedTestCaseHid.run(MultiThreadedTestCaseHid.java:54)
        at junit.framework.TestSuite.runTest(TestSuite.java:173)
        at junit.framework.TestSuite.run(TestSuite.java:168)
        at junit.framework.TestSuite.runTest(TestSuite.java:173)
        at junit.framework.TestSuite.run(TestSuite.java:168)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at org.netbeans.junit.NbTestSetup$1.protect(NbTestSetup.java:33)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at org.netbeans.junit.NbTestSetup.run(NbTestSetup.java:37)
        at
org.netbeans.xtest.junit.JUnitTestRunnerExt.run(JUnitTestRunnerExt.java:216)
        at
org.netbeans.xtest.junit.JUnitTestRunnerExt.main(JUnitTestRunnerExt.java:356)

testGetSize

junit.framework.AssertionFailedError: Unexpected size of root. Should be 0.
[class org.openide.filesystems.LocalFileSystemTest]
        at junit.framework.Assert.fail(Assert.java:51)
        at junit.framework.Assert.assert(Assert.java:20)
        at org.openide.filesystems.TestBaseHid.fsAssert(TestBaseHid.java:80)
        at
org.openide.filesystems.FileObjectTestHid.testGetSize(FileObjectTestHid.java:853)
        at java.lang.reflect.Method.invoke(Native Method)
        at junit.framework.TestCase.runTest(TestCase.java:166)
        at junit.framework.TestCase.runBare(TestCase.java:140)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:131)
        at org.netbeans.junit.NbTestCase.run(NbTestCase.java:76)
        at
org.openide.filesystems.MultiThreadedTestCaseHid.run(MultiThreadedTestCaseHid.java:54)
        at junit.framework.TestSuite.runTest(TestSuite.java:173)
        at junit.framework.TestSuite.run(TestSuite.java:168)
        at junit.framework.TestSuite.runTest(TestSuite.java:173)
        at junit.framework.TestSuite.run(TestSuite.java:168)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at org.netbeans.junit.NbTestSetup$1.protect(NbTestSetup.java:33)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at org.netbeans.junit.NbTestSetup.run(NbTestSetup.java:37)
        at
org.netbeans.xtest.junit.JUnitTestRunnerExt.run(JUnitTestRunnerExt.java:216)
        at
org.netbeans.xtest.junit.JUnitTestRunnerExt.main(JUnitTestRunnerExt.java:356)

Please fix the fs code, the tests, or exclude the tests, but anyway make sure
the stable config does not fail.
Comment 1 rmatous 2001-11-30 13:46:00 UTC
I`m sorry, but on Win2000 it seems that no test fails. I`ll 
investigate it on Linux and Solaris. I`ll solve it today.
Comment 2 Jesse Glick 2001-11-30 14:20:23 UTC
Yes, I use Linux (JDK 1.3.1_01). Let me know if you need the complete
logs for the other tests too, and also if you want I can try to run
the tests again to see if they fail reproducibly for me.
Comment 3 rmatous 2001-11-30 17:33:23 UTC
I did not know that on UNIX is true that:
 1/ new File ("folder").length != 0
 2/ after file "ioFile" is modified: ioFile.lastModified () < 
timeBeforeStartOfWriting

So I modified tests and fixed to relase33. I deleted 
testLastModified .

Then there also fails testRename on Solaris. So, I`ll investigate it. 
But at the moment was this code excluded from stable bag.


Comment 4 Jesse Glick 2001-11-30 18:34:57 UTC
#2 looks strange, but #1 is quite normal on Unix. Folders contain a
list of files. Normally you are not permitted to read this data
directly, but it does consume some space on disk, typically 1024 bytes
or some multiple of that.
Comment 5 Quality Engineering 2003-07-01 16:05:19 UTC
Resolved for 3.4.x or earlier, no new info since then -> verified
Comment 6 Quality Engineering 2003-07-01 16:25:05 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.