File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
google-cloud-firestore/src/test/java/com/google/cloud/firestore/it Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 3939import com .google .common .base .Joiner ;
4040import com .google .common .base .Joiner .MapJoiner ;
4141import com .google .common .base .Optional ;
42+ import com .google .common .base .Preconditions ;
4243import com .google .common .base .Predicate ;
4344import com .google .common .collect .FluentIterable ;
4445import com .google .common .collect .Range ;
@@ -83,6 +84,9 @@ public void before() {
8384
8485 @ AfterClass
8586 public static void afterClass () throws Exception {
87+ Preconditions .checkNotNull (
88+ firestore ,
89+ "Error instantiating Firestore. Check that the service account credentials were properly set." );
8690 firestore .close ();
8791 }
8892
Original file line number Diff line number Diff line change 5555import com .google .cloud .firestore .Transaction .Function ;
5656import com .google .cloud .firestore .WriteBatch ;
5757import com .google .cloud .firestore .WriteResult ;
58+ import com .google .common .base .Preconditions ;
5859import com .google .common .collect .ImmutableList ;
5960import com .google .common .collect .ImmutableMap ;
6061import java .util .ArrayList ;
@@ -104,6 +105,9 @@ public void before() {
104105
105106 @ After
106107 public void after () throws Exception {
108+ Preconditions .checkNotNull (
109+ firestore ,
110+ "Error instantiating Firestore. Check that the service account credentials were properly set." );
107111 firestore .close ();
108112 }
109113
You can’t perform that action at this time.
0 commit comments