Index: pkg/analysis_server/test/edit/refactoring_test.dart |
diff --git a/pkg/analysis_server/test/edit/refactoring_test.dart b/pkg/analysis_server/test/edit/refactoring_test.dart |
index 54a4e1179219dab2fa52bc7891c0711181314fbc..7c9223afb4e7588562911eb6f83ab36ffdd95bb0 100644 |
--- a/pkg/analysis_server/test/edit/refactoring_test.dart |
+++ b/pkg/analysis_server/test/edit/refactoring_test.dart |
@@ -653,11 +653,10 @@ void res(int a, int b) { |
'''); |
} |
- Future<Response> _computeChange() { |
- return _prepareOptions().then((_) { |
- // send request with the options |
- return _sendExtractRequest(); |
- }); |
+ Future<Response> _computeChange() async { |
+ await _prepareOptions(); |
+ // send request with the options |
+ return _sendExtractRequest(); |
} |
Future<ExtractMethodFeedback> _computeInitialFeedback() { |
@@ -1867,12 +1866,10 @@ class _AbstractGetRefactoring_Test extends AbstractAnalysisTest { |
} |
Future<EditGetRefactoringResult> getRefactoringResult( |
- Future<Response> requestSender()) { |
- return waitForTasksFinished().then((_) { |
- return requestSender().then((Response response) { |
- return new EditGetRefactoringResult.fromResponse(response); |
- }); |
- }); |
+ Future<Response> requestSender()) async { |
+ await waitForTasksFinished(); |
+ Response response = await requestSender(); |
+ return new EditGetRefactoringResult.fromResponse(response); |
} |
Future<Response> sendRequest( |