Skip to content

Commit 0a691e3

Browse files
DanTupCommit Queue
authored andcommitted
[dds/dap] Fix a bug that could result in test failures
This logic was inverted and could result in duplicate terminate requests being sent. Depending on timing, this request might be sent but not responded to (because the DA was already shutting down), causing a "Application terminated with pending terminate request" error. Change-Id: If89f002792878f8a5ce12341536be70ee01cde11 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310380 Commit-Queue: Ben Konyi <[email protected]> Reviewed-by: Ben Konyi <[email protected]>
1 parent 6232479 commit 0a691e3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/dds/test/dap/integration/dart_test_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ main() {
136136
cwd: dap.testAppDir.path,
137137
);
138138

139-
// Send a single terinate, and expect a clean exit (with a `terminated`
139+
// Send a single terminate, and expect a clean exit (with a `terminated`
140140
// event).
141141
await Future.wait([
142142
dap.client.event('terminated'),

pkg/dds/test/dap/integration/test_support.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ environment:
233233

234234
Future<void> tearDown() async {
235235
// If the test hasn't already sent terminate, do that before shutting down.
236-
if (client.hasSentTerminateRequest) {
236+
if (!client.hasSentTerminateRequest) {
237237
await client.terminate();
238238
}
239239
await client.stop();

0 commit comments

Comments
 (0)