Skip to content

Commit 4591d72

Browse files
test(cloud_firestore, android): skip end 2 end test that is timing out on CI (#9361)
1 parent 88bded1 commit 4591d72

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

packages/cloud_firestore/cloud_firestore/example/test_driver/second_app_e2e.dart

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import 'package:cloud_firestore/cloud_firestore.dart';
66
import 'package:firebase_core/firebase_core.dart';
7+
import 'package:flutter/foundation.dart';
78
import 'package:flutter_test/flutter_test.dart';
89

910
import 'firebase_options_secondary.dart';
@@ -24,26 +25,31 @@ void runSecondAppTests() {
2425
);
2526
});
2627

27-
group('Secondary app Firestore instance', () {
28-
test(
29-
'Second Firestore instance should fail due to firestore.rules forbidding data writes',
30-
() async {
31-
// successful write on default app instance
32-
await firestore
33-
.collection('flutter-tests/banned/doc')
34-
.add({'foo': 'bar'});
35-
36-
// permission denied on second app with Firebase that denies database writes
37-
await expectLater(
38-
secondFirestoreProject
28+
group(
29+
'Secondary app Firestore instance',
30+
() {
31+
test(
32+
'Second Firestore instance should fail due to firestore.rules forbidding data writes',
33+
() async {
34+
// successful write on default app instance
35+
await firestore
3936
.collection('flutter-tests/banned/doc')
40-
.add({'foo': 'bar'}),
41-
throwsA(
42-
isA<FirebaseException>()
43-
.having((e) => e.code, 'code', 'permission-denied'),
44-
),
45-
);
46-
});
47-
});
37+
.add({'foo': 'bar'});
38+
39+
// permission denied on second app with Firebase that denies database writes
40+
await expectLater(
41+
secondFirestoreProject
42+
.collection('flutter-tests/banned/doc')
43+
.add({'foo': 'bar'}),
44+
throwsA(
45+
isA<FirebaseException>()
46+
.having((e) => e.code, 'code', 'permission-denied'),
47+
),
48+
);
49+
});
50+
},
51+
// Skip on android because the test continually times out on the CI. The test passes when running locally.
52+
skip: defaultTargetPlatform == TargetPlatform.android,
53+
);
4854
});
4955
}

0 commit comments

Comments
 (0)