Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.function.Supplier;
Expand Down Expand Up @@ -91,6 +93,7 @@ public ImportConfirmation get() {

private static final String PROP_LAST_MODIFIED_PROPERTY = "last modified";
private static final String TEXT_EDITOR_ID = "org.eclipse.ui.DefaultTextEditor";
private static final String GENERIC_EDITOR_ID = "org.eclipse.ui.genericeditor.GenericEditor";

private static final String GENERIC_CTF_TRACE_TYPE = "Common Trace Format : Generic CTF Trace";
private static final String LTTNG_KERNEL_TRACE_TYPE = "Common Trace Format : Linux Kernel Trace";
Expand Down Expand Up @@ -1524,7 +1527,7 @@ private static void verifyTrace(TestTraceInfo traceInfo, int importOptionFlags,
// If there is no trace type, make sure it can be opened with the text editor
fBot.waitUntil(ConditionHelpers.isEditorOpened(fBot, traceName));
SWTBotEditor editor = fBot.editorByTitle(traceName);
assertEquals(TEXT_EDITOR_ID, editor.getReference().getId());
assertTrue(editor.getReference().getId(), Arrays.asList(TEXT_EDITOR_ID, GENERIC_EDITOR_ID).contains(editor.getReference().getId()));
}
checkTraceLinked(traceItem, (importOptionFlags & ImportTraceWizardPage.OPTION_CREATE_LINKS_IN_WORKSPACE) != 0);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**********************************************************************
* Copyright (c) 2017, 2020 Ericsson
* Copyright (c) 2017, 2025 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License 2.0 which
Expand Down Expand Up @@ -329,7 +329,7 @@ public void testLegendArrow() {
resetTimeRange();
Rectangle bounds = fBounds;

ImageHelper ref = ImageHelper.grabImage(bounds);
ImageHelper ref = ImageHelper.waitForNewImage(bounds, null);

// Set the widths to 0.25

Expand Down Expand Up @@ -550,7 +550,7 @@ public void testLegend() {
resetTimeRange();
Rectangle bounds = fBounds;

ImageHelper ref = ImageHelper.grabImage(bounds);
ImageHelper ref = ImageHelper.waitForNewImage(bounds, null);

// Set the widths to 0.25

Expand Down Expand Up @@ -721,7 +721,7 @@ public void testVerticalZoom() {
SWTBotTimeGraph timegraph = fTimeGraph;
Rectangle bounds = fBounds;

ImageHelper ref = ImageHelper.grabImage(bounds);
ImageHelper ref = ImageHelper.waitForNewImage(bounds, null);

fireKeyAndWait(timegraph, bounds, false, '+', SWT.CTRL);
fireKeyAndWait(timegraph, bounds, false, '-', SWT.CTRL);
Expand Down Expand Up @@ -1088,7 +1088,7 @@ public void testTimegraphEventFiltering() {

Rectangle bounds = fBounds;

ImageHelper ref = ImageHelper.grabImage(bounds);
ImageHelper ref = ImageHelper.waitForNewImage(bounds, null);

timegraph.setFocus();
// Move mouse to middle of the timegraph
Expand Down
Loading