diff options
Diffstat (limited to 'dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java')
-rw-r--r-- | dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java index b2c1c25c802..034c690b15f 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java @@ -38,10 +38,7 @@ import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.core.runtime.preferences.DefaultScope; -import org.junit.After; import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.osgi.service.prefs.Preferences; @@ -70,8 +67,10 @@ public class OperationsWhileTargetIsRunningTest extends BaseTestCase { */ private static final String EXEC_NAME = "TargetAvail.exe"; - @Before - public void init() throws Exception { + @Override + public void doBeforeTest() throws Exception { + super.doBeforeTest(); + final DsfSession session = getGDBLaunch().getSession(); Runnable runnable = new Runnable() { @@ -92,13 +91,17 @@ public class OperationsWhileTargetIsRunningTest extends BaseTestCase { } - @After - public void tearDown() { + @Override + public void doAfterTest() throws Exception { + super.doAfterTest(); + fServicesTracker.dispose(); } - @BeforeClass - public static void beforeClassMethod() { + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME); } @@ -110,7 +113,7 @@ public class OperationsWhileTargetIsRunningTest extends BaseTestCase { @Test public void restartWhileTargetRunningKillGDB() throws Throwable { // Restart is not supported for a remote session - if (BaseTestCase.isRemoteSession()) { + if (isRemoteSession()) { Assert.assertFalse("Restart operation should not be allowed for a remote session", SyncUtil.canRestart()); return; @@ -140,7 +143,7 @@ public class OperationsWhileTargetIsRunningTest extends BaseTestCase { @Test public void restartWhileTargetRunningGDBAlive() throws Throwable { // Restart is not supported for a remote session - if (BaseTestCase.isRemoteSession()) { + if (isRemoteSession()) { Assert.assertFalse("Restart operation should not be allowed for a remote session", SyncUtil.canRestart()); return; |