Skip to content

Commit 208f053

Browse files
authored
Disable gRPC death tests (#2643)
* Remove default app that writes to Firestore. This ends up running during unit test execution and that doesn't work on Travis. * Remove gRPC death tests These are expensive because they actually are catching abort().
1 parent d87b15f commit 208f053

File tree

4 files changed

+0
-56
lines changed

4 files changed

+0
-56
lines changed

Firestore/Example/App/macOS/AppDelegate.m

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,6 @@ @interface AppDelegate ()
2626
@implementation AppDelegate
2727

2828
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
29-
// create a firestore db
30-
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info"
31-
ofType:@"plist"];
32-
FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath];
33-
[FIRApp configureWithOptions:options];
34-
FIRFirestore *db = [FIRFirestore firestore];
35-
36-
// do the timestamp fix
37-
FIRFirestoreSettings *settings = db.settings;
38-
db.settings = settings;
39-
40-
// create a doc
41-
FIRDocumentReference *docRef = [[db collectionWithPath:@"junk"] documentWithPath:@"test_doc"];
42-
NSDictionary *data = @{@"msg" : @"hello"};
43-
44-
[docRef setData:data
45-
completion:^(NSError *_Nullable error) {
46-
if (error != nil) {
47-
NSLog(@"created error: %@", error);
48-
} else {
49-
NSLog(@"Yay!");
50-
}
51-
}];
5229
}
5330

5431
- (void)applicationWillTerminate:(NSNotification *)aNotification {

Firestore/core/test/firebase/firestore/remote/grpc_stream_test.cc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -196,18 +196,6 @@ TEST_F(GrpcStreamTest, CanGetResponseHeadersAfterFinishing) {
196196
});
197197
}
198198

199-
// Death tests should contain the word "DeathTest" in their name -- see
200-
// https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#death-test-naming
201-
using GrpcStreamDeathTest = GrpcStreamTest;
202-
203-
TEST_F(GrpcStreamDeathTest, CannotRestart) {
204-
worker_queue.EnqueueBlocking([&] { stream->Start(); });
205-
KeepPollingGrpcQueue();
206-
worker_queue.EnqueueBlocking([&] { stream->FinishImmediately(); });
207-
worker_queue.EnqueueBlocking(
208-
[&] { EXPECT_DEATH_IF_SUPPORTED(stream->Start(), ""); });
209-
}
210-
211199
// Read and write
212200

213201
TEST_F(GrpcStreamTest, ReadIsAutomaticallyReadded) {

Firestore/core/test/firebase/firestore/remote/grpc_streaming_reader_test.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,6 @@ TEST_F(GrpcStreamingReaderTest, CanGetResponseHeadersAfterFinishing) {
136136

137137
// Method prerequisites -- incorrect usage
138138

139-
// Death tests should contain the word "DeathTest" in their name -- see
140-
// https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#death-test-naming
141-
using GrpcStreamingReaderDeathTest = GrpcStreamingReaderTest;
142-
143139
TEST_F(GrpcStreamingReaderTest, CannotFinishAndNotifyBeforeStarting) {
144140
// No callback has been assigned.
145141
worker_queue.EnqueueBlocking(

Firestore/core/test/firebase/firestore/remote/grpc_unary_call_test.cc

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -119,23 +119,6 @@ TEST_F(GrpcUnaryCallTest, CanGetResponseHeadersAfterFinishing) {
119119
});
120120
}
121121

122-
// Method prerequisites -- incorrect usage
123-
124-
// Death tests should contain the word "DeathTest" in their name -- see
125-
// https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#death-test-naming
126-
using GrpcUnaryCallDeathTest = GrpcUnaryCallTest;
127-
128-
TEST_F(GrpcUnaryCallDeathTest, CannotStartTwice) {
129-
StartCall();
130-
EXPECT_DEATH_IF_SUPPORTED(StartCall(), "");
131-
}
132-
133-
TEST_F(GrpcUnaryCallDeathTest, CannotRestart) {
134-
StartCall();
135-
ForceFinish({{Type::Finish, CompletionResult::Ok}});
136-
EXPECT_DEATH_IF_SUPPORTED(StartCall(), "");
137-
}
138-
139122
TEST_F(GrpcUnaryCallTest, CannotFinishAndNotifyBeforeStarting) {
140123
// No callback has been assigned.
141124
worker_queue.EnqueueBlocking(

0 commit comments

Comments
 (0)