Skip to content

Commit

Permalink
chore: remove delay to start datastore in tests (#3738)
Browse files Browse the repository at this point in the history
chore: remove start delay is datastore tests
  • Loading branch information
Jordan-Nelson authored Sep 14, 2023
1 parent 46ca8db commit 0c6ec05
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void main() {
await Amplify.DataStore.save(blog);
var resultOne = await Amplify.DataStore.query(Blog.classType);
expect(resultOne, isNotEmpty);
await Amplify.DataStore.clear();
await clearDataStore();
var resultTwo = await Amplify.DataStore.query(Blog.classType);
expect(resultTwo, isEmpty);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import 'package:amplify_flutter/amplify_flutter.dart';
const ENABLE_CLOUD_SYNC =
bool.fromEnvironment('ENABLE_CLOUD_SYNC', defaultValue: false);
const DATASTORE_READY_EVENT_TIMEOUT = const Duration(minutes: 10);
const DELAY_TO_START_DATASTORE = const Duration(milliseconds: 500);
const DELAY_TO_CLEAR_DATASTORE = const Duration(seconds: 2);
const DELAY_FOR_OBSERVE = const Duration(milliseconds: 100);

Expand Down Expand Up @@ -106,7 +105,6 @@ class DataStoreStarter {
}

Future<void> startDataStore() async {
await Future.delayed(DELAY_TO_START_DATASTORE);
await DataStoreStarter().startDataStore();
}

Expand Down

0 comments on commit 0c6ec05

Please sign in to comment.