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 @@ -48,7 +48,7 @@ org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
org.eclipse.debug.ui;bundle-version="[3.10.0,4.0.0)",
org.eclipse.debug.ui.launchview;bundle-version="[1.0.2,2.0.0)",
org.junit
org.eclipse.debug.ui.launchview;bundle-version="[1.0.2,2.0.0)"
Import-Package: org.junit.jupiter.api;version="[5.14.0,6.0.0)",
org.junit.platform.suite.api;version="[1.14.0,2.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-21
Bundle-Vendor: %providerName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit5"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.debug.ui.launchview.tests.AutomatedSuite"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.debug.ui.launchview.tests"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,24 @@
import org.eclipse.ui.intro.IIntroManager;
import org.eclipse.ui.intro.IIntroPart;
import org.eclipse.ui.progress.UIJob;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.rules.TestName;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.TestInfo;

public class AbstractLaunchViewTest {

private static boolean welcomeClosed;

@Rule
public TestName name = new TestName();


@Before
public void setUp() throws Exception {
TestUtil.log(IStatus.INFO, name.getMethodName(), "setUp");
@BeforeEach
public void setUp(TestInfo testInfo) throws Exception {
TestUtil.log(IStatus.INFO, testInfo.getDisplayName(), "setUp");
assertWelcomeScreenClosed();
}

@After
public void tearDown() throws Exception {
TestUtil.log(IStatus.INFO, name.getMethodName(), "tearDown");
TestUtil.cleanUp(name.getMethodName());
@AfterEach
public void tearDown(TestInfo testInfo) throws Exception {
TestUtil.log(IStatus.INFO, testInfo.getDisplayName(), "tearDown");
TestUtil.cleanUp(testInfo.getDisplayName());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
package org.eclipse.debug.ui.launchview.tests;

import org.eclipse.debug.ui.launchview.tests.launchview.LaunchViewSmokeTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

/**
* Tests for integration and nightly builds.
*
* @since 1.0
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
@Suite
@SelectClasses({ //
// Launch Configuration View
LaunchViewSmokeTest.class,
LaunchViewSmokeTest.class, //
})
public class AutomatedSuite {
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
*******************************************************************************/
package org.eclipse.debug.ui.launchview.tests;

import static org.junit.jupiter.api.Assertions.assertFalse;

import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo;
import java.util.ArrayList;
Expand All @@ -27,7 +29,6 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.swt.widgets.Display;
import org.junit.Assert;
import org.osgi.framework.Bundle;
import org.osgi.framework.FrameworkUtil;

Expand All @@ -40,7 +41,7 @@ public class TestUtil {
*/
public static void cleanUp(String owner) {
// Ensure that the Thread.interrupted() flag didn't leak.
Assert.assertFalse("The main thread should not be interrupted at the end of a test", Thread.interrupted());
assertFalse(Thread.interrupted(), "The main thread should not be interrupted at the end of a test");

// Wait for any outstanding jobs to finish. Protect against deadlock by
// terminating the wait after a timeout.
Expand All @@ -53,7 +54,7 @@ public static void cleanUp(String owner) {
}

// Ensure that the Thread.interrupted() flag didn't leak.
Assert.assertFalse("The main thread should not be interrupted at the end of a test", Thread.interrupted());
assertFalse(Thread.interrupted(), "The main thread should not be interrupted at the end of a test");
}

public static void log(int severity, String owner, String message, Throwable... optionalError) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,25 @@
*******************************************************************************/
package org.eclipse.debug.ui.launchview.tests.launchview;

import static org.junit.Assert.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.fail;

import org.eclipse.debug.ui.launchview.tests.AbstractLaunchViewTest;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.junit.Test;
import org.junit.jupiter.api.Test;

public class LaunchViewSmokeTest extends AbstractLaunchViewTest {

@Test
public void testOpenView() {
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
assertNotNull("The active workbench page should not be null", page); //$NON-NLS-1$
assertNotNull(page, "The active workbench page should not be null");
try {
page.showView("org.eclipse.debug.ui.launchView"); //$NON-NLS-1$
} catch (PartInitException exception) {
assertNotNull("Failed to open launch configuration view", null); //$NON-NLS-1$
fail("Failed to open launch configuration view");
}

}
Expand Down
Loading