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.
Was marked as failing randomly, but in fact fails every time I run it.
Will comment out until fixed.
Fixed. http://hg.netbeans.org/core-main/rev/4b3588525a91
Still failing.
I tried to fix options.keymap/test/unit/src/org/netbeans/modules/options/keymap/KeymapViewModelTest.java#testChangeShortcutsOk. But it is still failing. Maxi, could you look at it? I don't exactly know what it is supposed to do. model.apply() should store changed shortcuts but it calls "model = new KeymapModel ();" which resets it. I am lost here. Remember that it fails only in debugger (toggle breakpoint at line with checkShortcuts) because model.apply() is posted to RequestProcessor.
Integrated into 'main-golden', will be available in build *200809200201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/fb094462d278 User: Jiri Skrivanek <jskrivanek@netbeans.org> Log: #137748 - testChangeShortcutsOk still failing.
The "model = new KeymapModel ();" does not break anything, since call to changeKeymap stores everything to looked-up keymapmanagers. Jirko, is it a problem that it fails in debugger in described scenerio? Normally, the test passes OK for me. In case not, I suggest to close this issue and leave the test as such: public void testChangeShortcutsOk () { KeymapViewModel model = new KeymapViewModel (); Map<Set<String>,ShortcutAction> shortcuts = setRandomShortcuts (model); System.out.println ("apply changes"); model.apply (); System.gc (); model.apply (); System.gc (); checkShortcuts (model, shortcuts, true); }
The problem is that the test failed randomly and if you run it in debugger it fails regularly. As I said it is because model.apply() is done in RequestProcessor and in fact it doesn't executed if you just run it. The test itself finishes before RequestProcessor processes its tasks. To reproduce reliably add something like this to the test: model.apply (); while(model.isChanged()) { Thread.sleep(100); } Then the test fails everytime.
This needs to be redesigned, I agree. apply() w/o RequestProcessor would take ages, so we have to find another way of applying the changes.
Integrated into 'main-golden', will be available in build *201210231040* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/df9fc911dd1f User: Milutin Kristofic <mkristofic@netbeans.org> Log: #137748 - KeymapViewModelTest.testChangeShortcutsOk fails
revert my changes in http://hg.netbeans.org/jet-main/rev/db2b9e4fed6f
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss