Skip to content

Commit 0c6ec05

Browse files
chore: remove delay to start datastore in tests (#3738)
chore: remove start delay is datastore tests
1 parent 46ca8db commit 0c6ec05

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

packages/amplify_datastore/example/integration_test/clear_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void main() {
2222
await Amplify.DataStore.save(blog);
2323
var resultOne = await Amplify.DataStore.query(Blog.classType);
2424
expect(resultOne, isNotEmpty);
25-
await Amplify.DataStore.clear();
25+
await clearDataStore();
2626
var resultTwo = await Amplify.DataStore.query(Blog.classType);
2727
expect(resultTwo, isEmpty);
2828
});

packages/amplify_datastore/example/integration_test/utils/setup_utils.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import 'package:amplify_flutter/amplify_flutter.dart';
1212
const ENABLE_CLOUD_SYNC =
1313
bool.fromEnvironment('ENABLE_CLOUD_SYNC', defaultValue: false);
1414
const DATASTORE_READY_EVENT_TIMEOUT = const Duration(minutes: 10);
15-
const DELAY_TO_START_DATASTORE = const Duration(milliseconds: 500);
1615
const DELAY_TO_CLEAR_DATASTORE = const Duration(seconds: 2);
1716
const DELAY_FOR_OBSERVE = const Duration(milliseconds: 100);
1817

@@ -106,7 +105,6 @@ class DataStoreStarter {
106105
}
107106

108107
Future<void> startDataStore() async {
109-
await Future.delayed(DELAY_TO_START_DATASTORE);
110108
await DataStoreStarter().startDataStore();
111109
}
112110

0 commit comments

Comments
 (0)