forked from firka/flutter
Reland eliminate timeouts from integration tests (#85141)
This commit is contained in:
@@ -7,7 +7,6 @@ import 'dart:async';
|
||||
import 'package:integration_test/integration_test_driver.dart' as driver;
|
||||
|
||||
Future<void> main() => driver.integrationDriver(
|
||||
timeout: const Duration(minutes: 5),
|
||||
responseDataCallback: (Map<String, dynamic>? data) async {
|
||||
await driver.writeResponseData(
|
||||
data,
|
||||
|
||||
@@ -55,12 +55,12 @@ void main() {
|
||||
|
||||
test('complex_layout_scroll_perf', () async {
|
||||
await testScrollPerf('complex-scroll', 'complex_layout_scroll_perf');
|
||||
});
|
||||
}, timeout: Timeout.none);
|
||||
|
||||
test('tiles_scroll_perf', () async {
|
||||
await driver.tap(find.byTooltip('Open navigation menu'));
|
||||
await driver.tap(find.byValueKey('scroll-switcher'));
|
||||
await testScrollPerf('tiles-scroll', 'tiles_scroll_perf');
|
||||
});
|
||||
}, timeout: Timeout.none);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -40,6 +40,6 @@ void main() {
|
||||
|
||||
final String jsonEncoded = json.encode(<String, dynamic>{'initialSemanticsTreeCreation': semanticsTreeCreation.inMilliseconds});
|
||||
File(p.join(testOutputsDirectory, 'complex_layout_semantics_perf.json')).writeAsStringSync(jsonEncoded);
|
||||
});
|
||||
}, timeout: Timeout.none);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,6 +15,5 @@ Future<void> main() async {
|
||||
kCullOpacityRouteName,
|
||||
pageDelay: const Duration(seconds: 1),
|
||||
duration: const Duration(seconds: 10),
|
||||
timeout: const Duration(seconds: 45),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,5 @@ void main() {
|
||||
kMultiWidgetConstructionRouteName,
|
||||
pageDelay: const Duration(seconds: 1),
|
||||
duration: const Duration(seconds: 10),
|
||||
timeout: const Duration(seconds: 45),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ void macroPerfTestE2E(
|
||||
String routeName, {
|
||||
Duration pageDelay,
|
||||
Duration duration = const Duration(seconds: 3),
|
||||
Duration timeout = const Duration(seconds: 30),
|
||||
ControlCallback body,
|
||||
ControlCallback setup,
|
||||
}) {
|
||||
@@ -63,5 +62,5 @@ void macroPerfTestE2E(
|
||||
}
|
||||
await durationFuture;
|
||||
});
|
||||
}, semanticsEnabled: false, timeout: Timeout(timeout));
|
||||
}, semanticsEnabled: false, timeout: Timeout.none);
|
||||
}
|
||||
|
||||
@@ -20,5 +20,5 @@ Future<void> main() async {
|
||||
await summary.writeTimelineToFile(fileName, pretty: true);
|
||||
|
||||
await driver.close();
|
||||
});
|
||||
}, timeout: Timeout.none);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,5 @@ void main() {
|
||||
kCullOpacityRouteName,
|
||||
pageDelay: const Duration(seconds: 1),
|
||||
duration: const Duration(seconds: 10),
|
||||
timeout: const Duration(minutes: 2),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
import 'package:integration_test/integration_test_driver.dart' as driver;
|
||||
|
||||
Future<void> main() => driver.integrationDriver(
|
||||
timeout: const Duration(minutes: 5),
|
||||
responseDataCallback: (Map<String, dynamic> data) async {
|
||||
await driver.writeResponseData(
|
||||
data['performance'] as Map<String, dynamic>,
|
||||
|
||||
@@ -7,7 +7,6 @@ import 'dart:io';
|
||||
import 'package:integration_test/integration_test_driver.dart' as driver;
|
||||
|
||||
Future<void> main() => driver.integrationDriver(
|
||||
timeout: const Duration(minutes: 1),
|
||||
responseDataCallback: (Map<String, dynamic> data) async {
|
||||
final Map<String, dynamic> benchmarkLiveResult =
|
||||
data['benchmarkLive'] as Map<String,dynamic>;
|
||||
|
||||
@@ -40,5 +40,5 @@ Future<void> main() async {
|
||||
}
|
||||
|
||||
await driver.close();
|
||||
});
|
||||
}, timeout: Timeout.none);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,5 @@ void main() {
|
||||
kMultiWidgetConstructionRouteName,
|
||||
pageDelay: const Duration(seconds: 1),
|
||||
duration: const Duration(seconds: 10),
|
||||
timeout: const Duration(seconds: 45),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ void main() {
|
||||
macroPerfTest(
|
||||
'picture_cache_perf',
|
||||
kPictureCacheRouteName,
|
||||
timeout: const Duration(seconds: 60),
|
||||
pageDelay: const Duration(seconds: 1),
|
||||
driverOps: (FlutterDriver driver) async {
|
||||
final SerializableFinder tabBarView = find.byValueKey('tabbar_view');
|
||||
|
||||
@@ -30,7 +30,7 @@ void main() {
|
||||
await file.writeAsString(_encodeJson(<String, dynamic>{
|
||||
'stack_size': stackSizeInBytes,
|
||||
}));
|
||||
}, timeout: const Timeout(kTimeout));
|
||||
}, timeout: Timeout.none);
|
||||
}
|
||||
|
||||
String _encodeJson(Map<String, dynamic> jsonObject) {
|
||||
|
||||
@@ -6,8 +6,6 @@ import 'package:flutter_driver/flutter_driver.dart';
|
||||
import 'package:macrobenchmarks/common.dart';
|
||||
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
|
||||
|
||||
const Duration kTimeout = Duration(seconds: 30);
|
||||
|
||||
typedef DriverTestCallBack = Future<void> Function(FlutterDriver driver);
|
||||
|
||||
Future<void> runDriverTestForRoute(String routeName, DriverTestCallBack body) async {
|
||||
@@ -34,14 +32,13 @@ Future<void> runDriverTestForRoute(String routeName, DriverTestCallBack body) as
|
||||
}
|
||||
|
||||
void macroPerfTest(
|
||||
String testName,
|
||||
String routeName,
|
||||
{ Duration pageDelay,
|
||||
Duration duration = const Duration(seconds: 3),
|
||||
Duration timeout = kTimeout,
|
||||
Future<void> Function(FlutterDriver driver) driverOps,
|
||||
Future<void> Function(FlutterDriver driver) setupOps,
|
||||
}) {
|
||||
String testName,
|
||||
String routeName, {
|
||||
Duration pageDelay,
|
||||
Duration duration = const Duration(seconds: 3),
|
||||
Future<void> Function(FlutterDriver driver) driverOps,
|
||||
Future<void> Function(FlutterDriver driver) setupOps,
|
||||
}) {
|
||||
test(testName, () async {
|
||||
Timeline timeline;
|
||||
await runDriverTestForRoute(routeName, (FlutterDriver driver) async {
|
||||
@@ -67,5 +64,5 @@ void macroPerfTest(
|
||||
|
||||
final TimelineSummary summary = TimelineSummary.summarize(timeline);
|
||||
await summary.writeTimelineToFile(testName, pretty: true);
|
||||
}, timeout: Timeout(timeout));
|
||||
}, timeout: Timeout.none);
|
||||
}
|
||||
|
||||
@@ -55,6 +55,6 @@ void main() {
|
||||
await driver.runUnsynchronized(() async {
|
||||
await testScrollPerf('platform-views-scroll', 'platform_views_scroll_perf');
|
||||
});
|
||||
});
|
||||
}, timeout: Timeout.none);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -55,6 +55,6 @@ void main() {
|
||||
await driver.runUnsynchronized(() async {
|
||||
await testScrollPerf('platform-views-scroll', 'platform_views_scroll_perf_hybrid_composition');
|
||||
});
|
||||
});
|
||||
}, timeout: Timeout.none);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -40,6 +40,6 @@ void main() {
|
||||
|
||||
final TimelineSummary summary = TimelineSummary.summarize(timeline);
|
||||
await summary.writeTimelineToFile('stocks_scroll_perf', pretty: true);
|
||||
});
|
||||
}, timeout: Timeout.none);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ void main() {
|
||||
test('Stock list is shown', () async {
|
||||
final SerializableFinder stockList = find.byValueKey('stock-list');
|
||||
expect(stockList, isNotNull);
|
||||
});
|
||||
}, timeout: Timeout.none);
|
||||
|
||||
test('open AAPL stock', () async {
|
||||
final SerializableFinder stockList = find.byValueKey('stock-list');
|
||||
@@ -36,10 +36,9 @@ void main() {
|
||||
|
||||
final SerializableFinder stockOption =
|
||||
find.byValueKey('AAPL_symbol_name');
|
||||
final String symbol = await driver.getText(stockOption,
|
||||
timeout: const Duration(milliseconds: 500));
|
||||
final String symbol = await driver.getText(stockOption);
|
||||
|
||||
expect(symbol, 'AAPL');
|
||||
}, skip: 'Needs to be fixed on Fuchsia.');
|
||||
}, skip: 'Needs to be fixed on Fuchsia.', timeout: Timeout.none);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user