Reland eliminate timeouts from integration tests (#85141)

This commit is contained in:
Dan Field
2021-06-23 13:08:51 -07:00
committed by GitHub
parent 568f135a13
commit 9c0bd18c40
46 changed files with 101 additions and 90 deletions

View File

@@ -18,5 +18,5 @@ void main() {
test('check that we are painting in debugPaintSize mode', () async {
expect(await driver.requestData('status'), 'log: paint debugPaintSize');
});
}, timeout: Timeout.none);
}

View File

@@ -18,6 +18,6 @@ void main() {
test('check that we are in normal mode', () async {
expect(await driver.requestData('status'), 'log: paint');
await driver.waitForAbsent(find.byType('PerformanceOverlay'), timeout: Duration.zero);
});
await driver.waitForAbsent(find.byType('PerformanceOverlay'));
}, timeout: Timeout.none);
}

View File

@@ -18,6 +18,6 @@ void main() {
test('check that we are showing the performance overlay', () async {
await driver.requestData('status'); // force a reassemble
await driver.waitFor(find.byType('PerformanceOverlay'), timeout: Duration.zero);
});
await driver.waitFor(find.byType('PerformanceOverlay'));
}, timeout: Timeout.none);
}

View File

@@ -18,5 +18,5 @@ void main() {
test('Can run with --dart-define', () async {
await driver.waitFor(find.text('Example,AValue'));
});
}, timeout: Timeout.none);
}

View File

@@ -23,7 +23,7 @@ void main() {
test('waitFor should find text "present"', () async {
await driver.waitFor(presentText);
});
}, timeout: Timeout.none);
test('waitForAbsent should time out waiting for text "present" to disappear', () async {
await expectLater(
@@ -34,7 +34,7 @@ void main() {
contains('Timeout while executing waitForAbsent'),
)),
);
});
}, timeout: Timeout.none);
test('waitForAbsent should resolve when text "present" disappears', () async {
// Begin waiting for it to disappear
@@ -50,7 +50,7 @@ void main() {
// Ensure waitForAbsent resolves
await whenWaitForAbsentResolves.future;
});
}, timeout: Timeout.none);
test('waitFor times out waiting for "present" to reappear', () async {
await expectLater(
@@ -61,7 +61,7 @@ void main() {
contains('Timeout while executing waitFor'),
)),
);
});
}, timeout: Timeout.none);
test('waitFor should resolve when text "present" reappears', () async {
// Begin waiting for it to reappear
@@ -77,11 +77,11 @@ void main() {
// Ensure waitFor resolves
await whenWaitForResolves.future;
});
}, timeout: Timeout.none);
test('waitForAbsent resolves immediately when the element does not exist', () async {
await driver.waitForAbsent(find.text('that does not exist'));
});
}, timeout: Timeout.none);
test('uses hit test to determine tappable elements', () async {
final SerializableFinder a = find.byValueKey('a');
@@ -97,7 +97,7 @@ void main() {
// Close it again
await driver.tap(a);
await driver.waitForAbsent(menu);
});
}, timeout: Timeout.none);
test('enters text in a text field', () async {
final SerializableFinder textField = find.byValueKey('enter-text-field');
@@ -106,6 +106,6 @@ void main() {
await driver.waitFor(find.text('Hello!'));
await driver.enterText('World!');
await driver.waitFor(find.text('World!'));
});
}, timeout: Timeout.none);
});
}

View File

@@ -18,6 +18,6 @@ void main() {
await driver.close();
});
test('empty', () async {}, timeout: const Timeout(Duration(minutes: 1)));
test('empty', () async {}, timeout: Timeout.none);
});
}

View File

@@ -59,6 +59,6 @@ void main() {
}
}
expect(heightTextDidExpand, isTrue);
});
}, timeout: Timeout.none);
});
}

View File

@@ -46,6 +46,6 @@ void main() {
// Ensure the scroll offset changed appropriately when TextField scrolled back into view.
expect(scrollOffsetWithKeyboard, greaterThan(scrollOffsetWithoutKeyboard));
});
}, timeout: Timeout.none);
});
}

View File

@@ -37,7 +37,7 @@ void main() {
final String foundLicense = await driver.getText(find.byValueKey('FlutterLicense'));
expect(foundPackage, equals('flutter'));
expect(foundLicense, equals(license));
});
}, timeout: Timeout.none);
test('engine license', () async {
await driver.waitFor(find.byValueKey('Header'));
@@ -46,6 +46,6 @@ void main() {
expect(foundPackage, equals('engine'));
// The engine has the same license, but with a different Copyright date.
expect(foundLicense, contains(license.replaceFirst('2014', '2013')));
});
}, timeout: Timeout.none);
});
}

View File

@@ -22,6 +22,6 @@ void main() {
// This only makes sense if you ran the test as described
// in the test file. It's normally run from devicelab.
expect(await driver.requestData('route'), '/smuggle-it');
});
}, timeout: Timeout.none);
});
}

View File

@@ -48,6 +48,6 @@ void main() {
imageBefore = imageAfter;
}
}, timeout: const Timeout(Duration(minutes: 2)));
}, timeout: Timeout.none);
});
}