Skip to content

Commit 604830d

Browse files
committed
releng: Fix SWTBot tests for 4.36 platform
The default editor for unrecognized files is now the Generic Editor. Wait for stable reference image in TimeGraphViewTest. Signed-off-by: Patrick Tasse <[email protected]>
1 parent 501e408 commit 604830d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

releng/org.eclipse.tracecompass.integration.swtbot.tests/src/org/eclipse/tracecompass/integration/swtbot/tests/projectexplorer/ProjectExplorerTracesFolderTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313

1414
import static org.junit.Assert.assertEquals;
1515
import static org.junit.Assert.assertNotEquals;
16+
import static org.junit.Assert.assertTrue;
1617
import static org.junit.Assert.fail;
1718

1819
import java.io.File;
1920
import java.io.IOException;
21+
import java.util.Arrays;
2022
import java.util.List;
2123
import java.util.Set;
2224
import java.util.function.Supplier;
@@ -91,6 +93,7 @@ public ImportConfirmation get() {
9193

9294
private static final String PROP_LAST_MODIFIED_PROPERTY = "last modified";
9395
private static final String TEXT_EDITOR_ID = "org.eclipse.ui.DefaultTextEditor";
96+
private static final String GENERIC_EDITOR_ID = "org.eclipse.ui.genericeditor.GenericEditor";
9497

9598
private static final String GENERIC_CTF_TRACE_TYPE = "Common Trace Format : Generic CTF Trace";
9699
private static final String LTTNG_KERNEL_TRACE_TYPE = "Common Trace Format : Linux Kernel Trace";
@@ -1524,7 +1527,7 @@ private static void verifyTrace(TestTraceInfo traceInfo, int importOptionFlags,
15241527
// If there is no trace type, make sure it can be opened with the text editor
15251528
fBot.waitUntil(ConditionHelpers.isEditorOpened(fBot, traceName));
15261529
SWTBotEditor editor = fBot.editorByTitle(traceName);
1527-
assertEquals(TEXT_EDITOR_ID, editor.getReference().getId());
1530+
assertTrue(editor.getReference().getId(), Arrays.asList(TEXT_EDITOR_ID, GENERIC_EDITOR_ID).contains(editor.getReference().getId()));
15281531
}
15291532
checkTraceLinked(traceItem, (importOptionFlags & ImportTraceWizardPage.OPTION_CREATE_LINKS_IN_WORKSPACE) != 0);
15301533
}

tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ui/swtbot/tests/views/TimeGraphViewTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ public void testLegend() {
550550
resetTimeRange();
551551
Rectangle bounds = fBounds;
552552

553-
ImageHelper ref = ImageHelper.grabImage(bounds);
553+
ImageHelper ref = ImageHelper.waitForNewImage(bounds, null);
554554

555555
// Set the widths to 0.25
556556

0 commit comments

Comments
 (0)