Remove state change race condition logic (#1081)

diff --git a/pkgs/test/CHANGELOG.md b/pkgs/test/CHANGELOG.md
index 1482a99..0da7748 100644
--- a/pkgs/test/CHANGELOG.md
+++ b/pkgs/test/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.6.11
+
+* Depend on the latest `test_core` and `test_api`.
+
 ## 1.6.10
 
 * Depend on the latest `test_core`.
diff --git a/pkgs/test/pubspec.yaml b/pkgs/test/pubspec.yaml
index 6376b29..f35e015 100644
--- a/pkgs/test/pubspec.yaml
+++ b/pkgs/test/pubspec.yaml
@@ -31,8 +31,8 @@
   web_socket_channel: ^1.0.0
   yaml: ^2.0.0
   # Use an exact version until the test_api and test_core package are stable.
-  test_api: 0.2.7
-  test_core: 0.2.9+1
+  test_api: 0.2.8
+  test_core: 0.2.9+2
 
 dev_dependencies:
   fake_async: ^1.0.0
diff --git a/pkgs/test_api/CHANGELOG.md b/pkgs/test_api/CHANGELOG.md
index f3cb847..d1580b0 100644
--- a/pkgs/test_api/CHANGELOG.md
+++ b/pkgs/test_api/CHANGELOG.md
@@ -1,3 +1,9 @@
+## 0.2.8
+
+* Remove logic which accounted for a race condition in state change. The logic
+  was required because `package:sse` used to not guarantee order. This is no
+  longer the case.
+
 ## 0.2.7
 
 * Prepare for upcoming `Stream<List<int>>` changes in the Dart SDK.
diff --git a/pkgs/test_api/lib/src/backend/live_test_controller.dart b/pkgs/test_api/lib/src/backend/live_test_controller.dart
index 43891c2..c8a6671 100644
--- a/pkgs/test_api/lib/src/backend/live_test_controller.dart
+++ b/pkgs/test_api/lib/src/backend/live_test_controller.dart
@@ -109,8 +109,6 @@
   /// Whether [close] has been called.
   bool get _isClosed => _onErrorController.isClosed;
 
-  final _stateChangedToComplete = Completer<void>();
-
   /// Creates a new controller for a [LiveTest].
   ///
   /// [test] is the test being run; [suite] is the suite that contains it.
@@ -160,11 +158,6 @@
 
     _state = newState;
     _onStateChangeController.add(newState);
-
-    if (newState.status == Status.complete &&
-        !_stateChangedToComplete.isCompleted) {
-      _stateChangedToComplete.complete();
-    }
   }
 
   /// Emits message over [LiveTest.onMessage].
@@ -196,8 +189,7 @@
   /// Returns a future that completes when the test is complete.
   ///
   /// We also wait for the state to transition to Status.complete.
-  Future<void> get onComplete =>
-      Future.wait([completer.future, _stateChangedToComplete.future]);
+  Future<void> get onComplete => completer.future;
 
   /// A wrapper for [_onClose] that ensures that all controllers are closed.
   Future<void> _close() {
@@ -212,10 +204,6 @@
       completer.complete();
     }
 
-    if (!_stateChangedToComplete.isCompleted) {
-      _stateChangedToComplete.complete();
-    }
-
     return onComplete;
   }
 }
diff --git a/pkgs/test_api/pubspec.yaml b/pkgs/test_api/pubspec.yaml
index f4a5bed..d04789e 100644
--- a/pkgs/test_api/pubspec.yaml
+++ b/pkgs/test_api/pubspec.yaml
@@ -1,5 +1,5 @@
 name: test_api
-version: 0.2.7
+version: 0.2.8
 author: Dart Team <misc@dartlang.org>
 description: A library for writing Dart tests.
 homepage: https://github.com/dart-lang/test/blob/master/pkgs/test_api
diff --git a/pkgs/test_core/CHANGELOG.md b/pkgs/test_core/CHANGELOG.md
index c0169a1..cde11b5 100644
--- a/pkgs/test_core/CHANGELOG.md
+++ b/pkgs/test_core/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.2.9+2
+
+* Depend on the latest `test_api`.
+
 ## 0.2.9+1
 
 * Allow the latest `package:vm_service`.
diff --git a/pkgs/test_core/pubspec.yaml b/pkgs/test_core/pubspec.yaml
index 68e1a56..ce215e5 100644
--- a/pkgs/test_core/pubspec.yaml
+++ b/pkgs/test_core/pubspec.yaml
@@ -1,5 +1,5 @@
 name: test_core
-version: 0.2.9+1
+version: 0.2.9+2
 author: Dart Team <misc@dartlang.org>
 description: A basic library for writing tests and running them on the VM.
 homepage: https://github.com/dart-lang/test/blob/master/pkgs/test_core
@@ -31,7 +31,7 @@
   # properly constrains all features it provides.
   matcher: ">=0.12.5 <0.12.6"
   # Use an exact version until the test_api package is stable.
-  test_api: 0.2.7
+  test_api: 0.2.8
 
 dependency_overrides:
   test_api: