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.
org.netbeans.core.projects.ValidateLayerConsistencyTest On the surface, this looks like the old issues from september of last year: Issue 46753 Issue 48770 Details for failed test/tests with errors: testAreAttributesFine: junit.framework.AssertionFailedError: Some attributes in files are unreadable[ File MultiFileObject@11f5ff9[Keymaps/NetBeans/D-BACK_QUOTE.shadow] attribute name originalFile, File MultiFileObject@d60225[Keymaps/Emacs/D-BACK_QUOTE.shadow] attribute name originalFile] at junit.framework.Assert.fail(Assert.java:47) at org.netbeans.core.projects.ValidateLayerConsistencyTest.testAreAttributesFine(ValidateLayerConsistencyTest.java:89) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at org.netbeans.junit.NbTestCase.runBare(NbTestCase.java:136) 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:118) at org.netbeans.junit.NbTestCase.access$001(NbTestCase.java:33) at org.netbeans.junit.NbTestCase$1.run(NbTestCase.java:105) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) testValidShadows: junit.framework.AssertionFailedError: Some shadow files in NetBeans profile are broken:[ File MultiFileObject@11f5ff9[Keymaps/NetBeans/D-BACK_QUOTE.shadow] is not a valid DataShadow., File MultiFileObject@d60225[Keymaps/Emacs/D-BACK_QUOTE.shadow] is not a valid DataShadow.] at junit.framework.Assert.fail(Assert.java:47) at org.netbeans.core.projects.ValidateLayerConsistencyTest.testValidShadows(ValidateLayerConsistencyTest.java:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at org.netbeans.junit.NbTestCase.runBare(NbTestCase.java:136) 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:118) at org.netbeans.junit.NbTestCase.access$001(NbTestCase.java:33) at org.netbeans.junit.NbTestCase$1.run(NbTestCase.java:105) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Passes fine for me, and we would have noticed immediately if it were failing since this test is part of the commit validation run by the continuous build. Also I inspected the relevant files: ide/defaults/src/org/netbeans/modules/defaults/mf-layer.xml core/windows/src/org/netbeans/core/windows/actions/RecentViewListAction.java and everything looks as it should; no changes to either in the last five days. Perhaps you have corrupted, or incorrectly patched, sources?
For what it's worth, I tried this again on the same PC, and again on another windows XP machine, both with a complely clean checkout. I get the same failures. I do NOT get the failures on a Linux box. I suspect it is a CVS/binary/line-termination/file-attributes problem, but I have not confirmed this. Charles
x
Looking at the test this time, I see that in testAreAttributesFine - though *not* in testValidShadows, which is new as of 1.20 (2005/09/20) - there is an explicit exclusion for this file: if ("Shortcuts/D-BACK_QUOTE.shadow".equals(fo.getPath())) { // #46753 continue; } But of course the above filename no longer exists - was changed when keymaps were introduced. Is it possible that every NB developer using Windows has been ignoring a commit validation failure for *months*?? Please tell me there is some other explanation...
Probably the simplest fix is to exclude the files in question from the test check as well. Hanzi, you have windows, so please do it. And try commit validation... The correct fix however would be similar to ide/applemenu module - e.g. to create a module that is enabled only on PlainUnix and register these shortcuts there, because the reason why these do not work on Windows is that they are conditionally disabled there (but still visible - e.g. just broken). Dafe had to do this before we had support for OS dependent modules and never got to the proper fix then.
probably some mistake. This is not my test, I do not understand this code, and I do not know whats wrong. Yarda if you know how to fix it, just do it.
It may not be your test but it is your integration that makes it fail. Moreover you have windows, so you can verify that your fix is correct. "the simplest fix is to exclude the files in question from the test check"
I can not fix your test, because I do not understand whats wrong. If the tests are not cirrect, fix them, please. If I have some issue in my code, file me a bug with some explanation.
Hanzi, please admit that you shall not commit your code without running the test and that it is your responsibility to fix either the code or the test. If you want to fix the problem in code, then remove declaration of Keymaps/NetBeans/D-BACK_QUOTE.shadow and Keymaps/Emacs/D-BACK_QUOTE.shadow from one of your layers. If you want to fix the problem in test, then try patch like this: Index: core/test/unit/src/org/netbeans/core/projects/ValidateLayerConsistencyTest.java =================================================================== RCS file: /cvs/core/test/unit/src/org/netbeans/core/projects/ValidateLayerConsistencyTest.java,v retrieving revision 1.20 diff -u -r1.20 ValidateLayerConsistencyTest.java --- core/test/unit/src/org/netbeans/core/projects/ValidateLayerConsistencyTest.java 20 Sep 2005 07:20:24 -0000 1.20 +++ core/test/unit/src/org/netbeans/core/projects/ValidateLayerConsistencyTest.java 30 Nov 2005 06:45:05 -0000 @@ -70,8 +70,12 @@ continue; } - if ("Shortcuts/D-BACK_QUOTE.shadow".equals(fo.getPath())) { - // #46753 + if ("Keymaps/NetBeans/D-BACK_QUOTE.shadow".equals(fo.getPath())) { + // #68866 + continue; + } + if ("Keymaps/Emacs/D-BACK_QUOTE.shadow".equals(fo.getPath())) { + // #68866 continue; } I am sorry I cannot help you more, I do not have windows to verify that the above really fixes the problem.
You have made a big step in our conversation here, thanks! But I still do not know what is the problem in my code: > If you want to fix the problem in code, then remove declaration of > Keymaps/NetBeans/D-BACK_QUOTE.shadow and Keymaps/Emacs/D-BACK_QUOTE.shadow > from one of your layers. Whats wrong here? I can not create two shadows for one DO in two different folders?
Yarda explained me how to fix it...
fixed: IDE:------------------------------------------------- IDE: [7.12.05 11:47] Committing "ValidateLayerConsistencyTest.java" started Checking in ValidateLayerConsistencyTest.java; /cvs/core/test/unit/src/org/netbeans/core/projects/ValidateLayerConsistencyTest.java,v <-- ValidateLayerConsistencyTest.java new revision: 1.21; previous revision: 1.20 done