jtulach commented on code in PR #9603:
URL: https://github.com/apache/netbeans/pull/9603#discussion_r3948725149
##########
ide/projectui/test/unit/src/org/netbeans/modules/project/ui/ProjectsRootNodeTest.java:
##########
@@ -403,7 +403,7 @@ public void testReplaceProjectSingleNonRootNode() throws
Exception { // #197864
}
};
ProjectsRootNode.checkNoLazyNode(ch);
- Node[] ns = ch.getNodes(true);
+ Node[] ns = ch.getNodes(false);
Review Comment:
- The test is using package private access to `setKeys` to modify them to
some non-standard value.
- then it reads `getNodes` that should match the artificial `setKeys` values
- however since #9589
- the keys are updated when `getNodes(true)` is called to value of
`OpenProjectList.getDefault()`
### TL;DR
- the test is flawed
- either it shouldn't call `setKeys` directly
- or it should set the node up to not be tight to
`OpenProjectList.getDefault()`
- I just wanted to get the test working
- using `getNodes(false)` seemed like the simplest way to achieve it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists