[flutter_tools] remove experiment tracking analytics for null safety (#70183)

This commit is contained in:
Jonah Williams
2020-11-10 12:49:50 -08:00
committed by GitHub
parent 39bc68b6a2
commit 0bbd9020ed
8 changed files with 1 additions and 49 deletions

View File

@@ -376,7 +376,7 @@ void main() {
);
// Allow any CustomDimensions.localTime (cd33) timestamp.
final RegExp usageRegexp = RegExp(
'screenView {cd3: false, cd4: ios, cd22: iOS 13, cd23: debug, cd18: false, cd15: swift, cd31: false, cd47: false, cd33: .*, viewName: run'
'screenView {cd3: false, cd4: ios, cd22: iOS 13, cd23: debug, cd18: false, cd15: swift, cd31: false, cd33: .*, viewName: run'
);
expect(buffer.toString(), matches(usageRegexp));
}, overrides: <Type, Generator>{

View File

@@ -525,7 +525,6 @@ void main() {
cdKey(CustomDimensions.hotEventSdkName): 'Example',
cdKey(CustomDimensions.hotEventEmulator): 'false',
cdKey(CustomDimensions.hotEventFullRestart): 'false',
cdKey(CustomDimensions.nullSafety): 'false',
})).called(1);
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
@@ -580,7 +579,6 @@ void main() {
cdKey(CustomDimensions.hotEventSdkName): 'Example',
cdKey(CustomDimensions.hotEventEmulator): 'false',
cdKey(CustomDimensions.hotEventFullRestart): 'false',
cdKey(CustomDimensions.nullSafety): 'false',
})).called(1);
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
@@ -645,7 +643,6 @@ void main() {
cdKey(CustomDimensions.hotEventSdkName): 'Example',
cdKey(CustomDimensions.hotEventEmulator): 'false',
cdKey(CustomDimensions.hotEventFullRestart): 'false',
cdKey(CustomDimensions.nullSafety): 'true',
})).called(1);
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
@@ -1398,7 +1395,6 @@ void main() {
cdKey(CustomDimensions.hotEventSdkName): 'Example',
cdKey(CustomDimensions.hotEventEmulator): 'false',
cdKey(CustomDimensions.hotEventFullRestart): 'true',
cdKey(CustomDimensions.nullSafety): 'false',
})).called(1);
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{

View File

@@ -96,30 +96,6 @@ void main() {
expect(flutterCommand.hidden, isTrue);
});
testUsingContext('null-safety is surfaced in command usage analytics', () async {
final FakeNullSafeCommand fake = FakeNullSafeCommand();
final CommandRunner<void> commandRunner = createTestCommandRunner(fake);
await commandRunner.run(<String>['safety', '--enable-experiment=non-nullable']);
final VerificationResult resultA = verify(usage.sendCommand(
'safety',
parameters: captureAnyNamed('parameters'),
));
expect(resultA.captured.first, containsPair('cd47', 'true'));
reset(usage);
await commandRunner.run(<String>['safety', '--enable-experiment=foo']);
final VerificationResult resultB = verify(usage.sendCommand(
'safety',
parameters: captureAnyNamed('parameters'),
));
expect(resultB.captured.first, containsPair('cd47', 'false'));
}, overrides: <Type, Generator>{
Usage: () => usage,
});
testUsingContext('uses the error handling file system', () async {
final DummyFlutterCommand flutterCommand = DummyFlutterCommand(
commandFunction: () async {