Skip to content

Commit 15c1f81

Browse files
committed
Merge branch 'release/2.8'
2 parents e8ce8c4 + 811917c commit 15c1f81

3 files changed

Lines changed: 17 additions & 10 deletions

File tree

launching/org.eclipse.rcptt.launching/src/org/eclipse/rcptt/internal/launching/aut/BaseAutLaunch.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,14 @@ public void restart() {
441441
try {
442442
setState(AutLaunchState.RESTART);
443443
ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration();
444-
final ILaunchConfigurationWorkingCopy copy = launchConfiguration.getWorkingCopy();
445-
LaunchInfoCache.copyCache(launchConfiguration, copy);
446-
LaunchInfoCache.remove(launchConfiguration);
444+
final ILaunchConfigurationWorkingCopy copy;
445+
if (launchConfiguration instanceof ILaunchConfigurationWorkingCopy w) {
446+
copy = w;
447+
} else {
448+
copy = launchConfiguration.getWorkingCopy();
449+
LaunchInfoCache.copyCache(launchConfiguration, copy);
450+
LaunchInfoCache.remove(launchConfiguration);
451+
}
447452
// To disable clear area during restart
448453
boolean configClearArea = copy.getAttribute(IPDELauncherConstants.CONFIG_CLEAR_AREA, false);
449454
copy.setAttribute(IPDELauncherConstants.CONFIG_CLEAR_AREA, false);
@@ -460,7 +465,6 @@ public void restart() {
460465
copy.setAttribute(IPDEConstants.RESTART, false);
461466
copy.setAttribute(IPDELauncherConstants.CONFIG_CLEAR_AREA, configClearArea);
462467
copy.setAttribute(IQ7Launch.ATTR_AUT_ID, "");
463-
copy.doSave();
464468
BaseAutManager.INSTANCE.handleRestart(BaseAutLaunch.this, oldLaunch, launch);
465469
} catch (Exception e) {
466470
terminated(e);

launching/tests/org.eclipse.rcptt.launching.ext.tests/src/org/eclipse/rcptt/launching/ext/Q7ExternalLaunchDelegateTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212

1313
import static java.lang.System.currentTimeMillis;
1414
import static java.nio.file.Files.isDirectory;
15-
import static org.junit.Assert.assertFalse;
16-
import static org.junit.Assert.assertNotNull;
17-
import static org.junit.Assert.assertTrue;
18-
import static org.junit.Assert.fail;
15+
import static org.junit.Assert.*;
1916

2017
import java.io.File;
2118
import java.io.IOException;
@@ -29,6 +26,7 @@
2926
import java.util.ArrayList;
3027
import java.util.Arrays;
3128
import java.util.EnumSet;
29+
import java.util.HashMap;
3230
import java.util.List;
3331
import java.util.Set;
3432
import java.util.concurrent.atomic.AtomicInteger;
@@ -141,6 +139,8 @@ public void runtimeIsInjected() throws CoreException, IOException, InterruptedEx
141139
public void surviveRestart() throws InterruptedException, CoreException, IOException {
142140
Path installDir = expandAut();
143141
AutLaunch launch = startAut(installDir, List.of("-consoleLog"));
142+
ILaunchConfiguration originalConfiguration = launch.getAut().getConfig();
143+
var originalAttributes = new HashMap<>(originalConfiguration.getAttributes());
144144
launch.ping();
145145
Command command = parse("restart-aut");
146146
int attemptCount = Integer.getInteger(Q7ExternalLaunchDelegateTest.class.getName() + ".restartAttempts", 3);
@@ -171,6 +171,7 @@ public void surviveRestart() throws InterruptedException, CoreException, IOExcep
171171
}
172172
}
173173
launch.ping();
174+
assertEquals(originalAttributes, originalConfiguration.getAttributes());
174175
}
175176
assertNoErrorsInOutput();
176177
}

rcpttTests/mockups/tests/EmptyWindowInAssertionMode.test

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Element-Type: testcase
66
Element-Version: 3.0
77
External-Reference:
88
Id: _Hgh7cLN3EeSIB87DbOtJCQ
9-
Runtime-Version: 2.8.0.202602281641
10-
Save-Time: 3/10/26, 9:28 PM
9+
Runtime-Version: 2.9.0.qualifier
10+
Save-Time: 3/17/26, 9:51 AM
1111
Testcase-Type: ecl
1212

1313
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
@@ -29,6 +29,8 @@ get-aut "mockupsQ7" | eval {
2929
get-view Applications | click
3030
get-button "Record a Snippet" | click
3131

32+
try { get-window "Control Panel - mockupsQ7 [Recording]" } -times 10 -delay 5000
33+
3234
with [get-window "Control Panel - mockupsQ7 [Recording]"] {
3335
get-button "Switch to Assertion Mode" | click
3436
}

0 commit comments

Comments
 (0)