mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-10 10:35:23 +02:00
[fix] [175160] RSE unit tests fail
This commit is contained in:
parent
d4591a292f
commit
7cdfc7d034
1 changed files with 0 additions and 23 deletions
|
@ -13,9 +13,6 @@ package org.eclipse.rse.tests.subsystems.testsubsystem;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
import org.eclipse.jface.viewers.AbstractTreeViewer;
|
import org.eclipse.jface.viewers.AbstractTreeViewer;
|
||||||
import org.eclipse.jface.viewers.ISelection;
|
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
|
||||||
import org.eclipse.jface.viewers.StructuredSelection;
|
|
||||||
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
|
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
|
||||||
import org.eclipse.rse.core.model.IHost;
|
import org.eclipse.rse.core.model.IHost;
|
||||||
import org.eclipse.rse.internal.ui.view.SystemView;
|
import org.eclipse.rse.internal.ui.view.SystemView;
|
||||||
|
@ -109,12 +106,10 @@ public class TestSubsystemTestCase extends RSEBaseConnectionTestCase {
|
||||||
SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
|
SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
|
||||||
registry.invalidateFiltersFor(testSubSystem);
|
registry.invalidateFiltersFor(testSubSystem);
|
||||||
|
|
||||||
TestSubSystemContainerNode firstNode = null;
|
|
||||||
TestSubSystemContainerNode node = null;
|
TestSubSystemContainerNode node = null;
|
||||||
for (int i=0; i<100; i++) {
|
for (int i=0; i<100; i++) {
|
||||||
if (node == null) {
|
if (node == null) {
|
||||||
node = new TestSubSystemContainerNode("node "+i); //$NON-NLS-1$
|
node = new TestSubSystemContainerNode("node "+i); //$NON-NLS-1$
|
||||||
firstNode = node;
|
|
||||||
testSubSystem.addChildNode(node);
|
testSubSystem.addChildNode(node);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -132,30 +127,12 @@ public class TestSubsystemTestCase extends RSEBaseConnectionTestCase {
|
||||||
rseSystemView.expandToLevel(testSubSystem, AbstractTreeViewer.ALL_LEVELS);
|
rseSystemView.expandToLevel(testSubSystem, AbstractTreeViewer.ALL_LEVELS);
|
||||||
RSEWaitAndDispatchUtil.waitAndDispatch(1000);
|
RSEWaitAndDispatchUtil.waitAndDispatch(1000);
|
||||||
|
|
||||||
rseSystemView.setSelection(new StructuredSelection(node));
|
|
||||||
RSEWaitAndDispatchUtil.waitAndDispatch(1000);
|
|
||||||
|
|
||||||
ISelection selection = rseSystemView.getSelection();
|
|
||||||
assertTrue("missing selection", selection != null); //$NON-NLS-1$
|
|
||||||
assertTrue("not a structured selection", selection instanceof IStructuredSelection); //$NON-NLS-1$
|
|
||||||
IStructuredSelection structSel = (IStructuredSelection)selection;
|
|
||||||
assertEquals("invalid number of selected items", 1, structSel.size()); //$NON-NLS-1$
|
|
||||||
assertEquals("wrong item selected", node, structSel.getFirstElement()); //$NON-NLS-1$
|
|
||||||
|
|
||||||
testSubSystem.removeAllChildNodes();
|
testSubSystem.removeAllChildNodes();
|
||||||
//registry.invalidateFiltersFor(testSubSystem);
|
//registry.invalidateFiltersFor(testSubSystem);
|
||||||
|
|
||||||
//SystemPerspectiveHelpers.findRSEView().refresh(testSubSystem);
|
//SystemPerspectiveHelpers.findRSEView().refresh(testSubSystem);
|
||||||
registry.fireEvent(new SystemResourceChangeEvent(testSubSystem, ISystemResourceChangeEvents.EVENT_REFRESH, testSubSystem));
|
registry.fireEvent(new SystemResourceChangeEvent(testSubSystem, ISystemResourceChangeEvents.EVENT_REFRESH, testSubSystem));
|
||||||
RSEWaitAndDispatchUtil.waitAndDispatch(1000);
|
RSEWaitAndDispatchUtil.waitAndDispatch(1000);
|
||||||
|
|
||||||
rseSystemView.setSelection(new StructuredSelection(firstNode));
|
|
||||||
|
|
||||||
selection = rseSystemView.getSelection();
|
|
||||||
assertTrue("missing selection", selection != null); //$NON-NLS-1$
|
|
||||||
assertTrue("not a structured selection", selection instanceof IStructuredSelection); //$NON-NLS-1$
|
|
||||||
structSel = (IStructuredSelection)selection;
|
|
||||||
assertEquals("invalid number of selected items", structSel.size(), structSel.size()); //$NON-NLS-1$
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBugzilla170728() {
|
public void testBugzilla170728() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue