Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 168205 Details for
Bug 309746
[CommonNavigator] intermittent test failure in org.eclipse.ui.tests.navigator.SorterTest.testSorterContentOverride
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fix for RC1
clipboard.txt (text/plain), 4.45 KB, created by
Francis Upton IV
on 2010-05-12 13:18:13 EDT
(
hide
)
Description:
Fix for RC1
Filename:
MIME Type:
Creator:
Francis Upton IV
Created:
2010-05-12 13:18:13 EDT
Size:
4.45 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.tests.navigator >Index: src/org/eclipse/ui/tests/navigator/SorterTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/SorterTest.java,v >retrieving revision 1.13 >diff -u -r1.13 SorterTest.java >--- src/org/eclipse/ui/tests/navigator/SorterTest.java 25 Apr 2010 02:38:50 -0000 1.13 >+++ src/org/eclipse/ui/tests/navigator/SorterTest.java 12 May 2010 17:17:55 -0000 >@@ -144,54 +144,85 @@ > > refreshViewer(); > _viewer.expandAll(); >- DisplayHelper.sleep(1000); > >- // Forwards >- items = _viewer.getTree().getItems(); >- assertEquals("p2", items[1].getText()); >- assertEquals("p1", items[0].getText()); >- // Always at the end because it's not a resource >- assertEquals("Test", items[2].getText()); >- childItems = items[1].getItems(); >- assertEquals("f1", childItems[0].getText()); >- childItems = items[0].getItems(); >- assertEquals("f1", childItems[0].getText()); >+ int count = 20; >+ boolean passed = false; >+ >+ while (!passed) { >+ // Forwards >+ items = _viewer.getTree().getItems(); >+ assertEquals("p2", items[1].getText()); >+ assertEquals("p1", items[0].getText()); >+ // Always at the end because it's not a resource >+ assertEquals("Test", items[2].getText()); >+ childItems = items[1].getItems(); >+ if (!childItems[0].getText().equals("f1") && count-- >= 0) { >+ System.out.println("Not equal: " + childItems[0].getText() + " waiting..."); >+ DisplayHelper.sleep(100); >+ continue; >+ } >+ assertEquals("f1", childItems[0].getText()); >+ childItems = items[0].getItems(); >+ assertEquals("f1", childItems[0].getText()); >+ passed = true; >+ } > > _contentService.getActivationService().activateExtensions( > new String[] { TEST_CONTENT_SORTER_RESOURCE_SORTONLY }, false); > > refreshViewer(); > _viewer.expandAll(); >- DisplayHelper.sleep(1000); > >- // Backwards >- items = _viewer.getTree().getItems(); >- assertEquals("p2", items[0].getText()); >- assertEquals("p1", items[1].getText()); >- assertEquals("Test", items[2].getText()); >- assertEquals("Bluefile6.txt", items[0].getItems()[0].getText()); >- assertEquals("f2", items[1].getItems()[0].getText()); >+ count = 20; >+ passed = false; > >+ while (!passed) { >+ // Backwards >+ items = _viewer.getTree().getItems(); >+ assertEquals("p2", items[0].getText()); >+ assertEquals("p1", items[1].getText()); >+ assertEquals("Test", items[2].getText()); >+ if (!items[0].getItems()[0].getText().equals("Bluefile6.txt") && count-- >= 0) { >+ System.out >+ .println("Not equal: " + items[0].getItems()[0].getText() + " waiting..."); >+ DisplayHelper.sleep(100); >+ continue; >+ } >+ assertEquals("Bluefile6.txt", items[0].getItems()[0].getText()); >+ assertEquals("f2", items[1].getItems()[0].getText()); >+ passed = true; >+ } > // And override again > _contentService.bindExtensions( > new String[] { TEST_CONTENT_SORTER_RESOURCE_SORTONLY_OVERRIDE }, false); > _contentService.getActivationService().activateExtensions( > new String[] { TEST_CONTENT_SORTER_RESOURCE_SORTONLY_OVERRIDE }, false); >- >+ > refreshViewer(); > _viewer.expandAll(); >- DisplayHelper.sleep(1000); > >- // Forwards - Test in front - since the override sorter sorts differently >- // than the resource extension sorter >- items = _viewer.getTree().getItems(); >- assertEquals("p2", items[2].getText()); >- assertEquals("p1", items[1].getText()); >- assertEquals("Test", items[0].getText()); >- childItems = items[2].getItems(); >- assertEquals("f1", childItems[0].getText()); >- childItems = items[1].getItems(); >- assertEquals("f1", childItems[0].getText()); >+ count = 20; >+ passed = false; >+ >+ while (!passed) { >+ // Forwards - Test in front - since the override sorter sorts >+ // differently >+ // than the resource extension sorter >+ items = _viewer.getTree().getItems(); >+ assertEquals("p2", items[2].getText()); >+ assertEquals("p1", items[1].getText()); >+ assertEquals("Test", items[0].getText()); >+ childItems = items[2].getItems(); >+ if (!childItems[0].getText().equals("f1") && count-- >= 0) { >+ System.out.println("Not equal: " + childItems[0].getText() + " waiting..."); >+ DisplayHelper.sleep(100); >+ continue; >+ } >+ assertEquals("f1", childItems[0].getText()); >+ childItems = items[1].getItems(); >+ assertEquals("f1", childItems[0].getText()); >+ passed = true; >+ } > } > > // Here we want to make sure the sorting is done by the
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 309746
: 168205 |
184166