diff --git a/pkgs/unified_analytics/test/log_handler_test.dart b/pkgs/unified_analytics/test/log_handler_test.dart index f2b5f349f..47a553d5b 100644 --- a/pkgs/unified_analytics/test/log_handler_test.dart +++ b/pkgs/unified_analytics/test/log_handler_test.dart @@ -65,7 +65,7 @@ void main() { final countOfEventsToSend = 10; for (var i = 0; i < countOfEventsToSend; i++) { - await analytics.send(testEvent); + analytics.send(testEvent); } expect(analytics.logFileStats(), isNotNull); @@ -91,7 +91,7 @@ void main() { final countOfEventsToSend = 10; for (var i = 0; i < countOfEventsToSend; i++) { - await analytics.send(testEvent); + analytics.send(testEvent); } final logFileStats = analytics.logFileStats(); @@ -110,7 +110,7 @@ void main() { final countOfEventsToSend = 10; for (var i = 0; i < countOfEventsToSend; i++) { - await analytics.send(testEvent); + analytics.send(testEvent); } final logFileStats = analytics.logFileStats(); @@ -149,7 +149,7 @@ void main() { // one malformed record on top of the logs and the rest // are valid log records for (var i = 0; i < kLogFileLength - 1; i++) { - await analytics.send(testEvent); + analytics.send(testEvent); } final logFileStats = analytics.logFileStats(); expect(logFile.readAsLinesSync().length, kLogFileLength); @@ -159,7 +159,7 @@ void main() { expect(logFile.readAsLinesSync()[0].trim(), '{{'); // Sending one more event should flush out the malformed record - await analytics.send(testEvent); + analytics.send(testEvent); final secondLogFileStats = analytics.logFileStats(); expect(secondLogFileStats, isNotNull); @@ -178,7 +178,7 @@ void main() { // Ensure it will work as expected after writing correct logs final countOfEventsToSend = 10; for (var i = 0; i < countOfEventsToSend; i++) { - await analytics.send(testEvent); + analytics.send(testEvent); } final secondLogFileStats = analytics.logFileStats(); diff --git a/pkgs/unified_analytics/test/suppression_test.dart b/pkgs/unified_analytics/test/suppression_test.dart index 9428906c2..4de0693c2 100644 --- a/pkgs/unified_analytics/test/suppression_test.dart +++ b/pkgs/unified_analytics/test/suppression_test.dart @@ -76,7 +76,7 @@ void main() { test('Suppression works as expected', () async { analytics.suppressTelemetry(); - await analytics.send(testEvent); + analytics.send(testEvent); final logFileStats = analytics.logFileStats(); @@ -86,7 +86,7 @@ void main() { test('Second instance is not suppressed', () async { analytics.suppressTelemetry(); - await analytics.send(testEvent); + analytics.send(testEvent); final logFileStats = analytics.logFileStats(); @@ -110,7 +110,7 @@ void main() { // Using a new event here to differentiate from the first one final newEvent = Event.commandExecuted(count: 2, name: 'commandName'); - await secondAnalytics.send(newEvent); + secondAnalytics.send(newEvent); // Both instances of `Analytics` should now have data retrieved // from `LogFileStats()` even though only the second instance diff --git a/pkgs/unified_analytics/test/survey_handler_test.dart b/pkgs/unified_analytics/test/survey_handler_test.dart index 6ac1537e2..908a654c5 100644 --- a/pkgs/unified_analytics/test/survey_handler_test.dart +++ b/pkgs/unified_analytics/test/survey_handler_test.dart @@ -358,7 +358,7 @@ void main() { // Simulate 60 events to send so that the first condition is satisified for (var i = 0; i < 60; i++) { - await analytics.send(testEvent); + analytics.send(testEvent); } final fetchedSurveys = await analytics.fetchAvailableSurveys(); @@ -405,7 +405,7 @@ void main() { // Simulate 60 events to send so that the first condition is satisified for (var i = 0; i < 60; i++) { - await analytics.send(testEvent); + analytics.send(testEvent); } final fetchedSurveys = await analytics.fetchAvailableSurveys(); @@ -448,7 +448,7 @@ void main() { // Simulate 60 events to send so that the first condition is satisified for (var i = 0; i < 60; i++) { - await analytics.send(testEvent); + analytics.send(testEvent); } await analytics.setTelemetry(false); @@ -515,7 +515,7 @@ void main() { // Simulate 60 events to send so that the first condition is satisified for (var i = 0; i < 60; i++) { - await analytics.send(testEvent); + analytics.send(testEvent); } final fetchedSurveys = await analytics.fetchAvailableSurveys(); @@ -617,7 +617,7 @@ void main() { // Simulate 60 events to send so that the first condition is satisified for (var i = 0; i < 60; i++) { - await analytics.send(testEvent); + analytics.send(testEvent); } final fetchedSurveys = await analytics.fetchAvailableSurveys(); @@ -686,7 +686,7 @@ void main() { // Simulate 60 events to send so that the first condition is satisified for (var i = 0; i < 60; i++) { - await analytics.send(testEvent); + analytics.send(testEvent); } final fetchedSurveys = await analytics.fetchAvailableSurveys(); @@ -743,7 +743,7 @@ void main() { // Simulate 60 events to send so that the first condition is satisified for (var i = 0; i < 60; i++) { - await analytics.send(testEvent); + analytics.send(testEvent); } // Setting to false will prevent anything from getting returned @@ -758,7 +758,7 @@ void main() { // at least 50 records for one of the conditions await analytics.setTelemetry(true); for (var i = 0; i < 60; i++) { - await analytics.send(testEvent); + analytics.send(testEvent); } fetchedSurveys = await analytics.fetchAvailableSurveys(); expect(fetchedSurveys.length, 1); @@ -805,7 +805,7 @@ void main() { // Simulate 60 events to send so that the first condition is satisified for (var i = 0; i < 60; i++) { - await analytics.send(testEvent); + analytics.send(testEvent); } final fetchedSurveys = await analytics.fetchAvailableSurveys(); @@ -851,7 +851,7 @@ void main() { // Simulate 60 events to send so that the first condition is satisified for (var i = 0; i < 60; i++) { - await analytics.send(testEvent); + analytics.send(testEvent); } final fetchedSurveys = await analytics.fetchAvailableSurveys();