File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
firebase-firestore/src/test/java/com/google/firebase/firestore Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,20 @@ public class LoadBundleTaskTest {
61
61
62
62
@ Test
63
63
public void testImplementsAllTaskInterface () {
64
+ // Check if the internal gms Hide annotation is accessible.
65
+ Class hideClazz = null ;
66
+ try {
67
+ hideClazz = Class .forName ("com.google.android.gms.common.internal.Hide" );
68
+ } catch (ClassNotFoundException e ) {
69
+ // Swallow the exception.
70
+ }
71
+
64
72
for (Method method : Task .class .getDeclaredMethods ()) {
73
+ // This method is annotated with @Hide, skipping.
74
+ if (hideClazz != null && method .getAnnotation (hideClazz ) != null ) {
75
+ continue ;
76
+ }
77
+
65
78
try {
66
79
LoadBundleTask .class .getDeclaredMethod (method .getName (), method .getParameterTypes ());
67
80
} catch (NoSuchMethodException e ) {
Original file line number Diff line number Diff line change 97
97
import java .util .List ;
98
98
import java .util .Map ;
99
99
import java .util .Set ;
100
+ import java .util .concurrent .ExecutorService ;
100
101
import java .util .logging .Logger ;
101
102
import java .util .regex .Pattern ;
102
103
import java .util .stream .Collectors ;
106
107
import org .json .JSONException ;
107
108
import org .json .JSONObject ;
108
109
import org .junit .Test ;
109
- import org .robolectric .android .util .concurrent .RoboExecutorService ;
110
+ import org .robolectric .android .util .concurrent .InlineExecutorService ;
110
111
111
112
/**
112
113
* Subclasses of SpecTestCase run a set of portable event specifications from JSON spec files
@@ -222,7 +223,7 @@ public abstract class SpecTestCase implements RemoteStoreCallback {
222
223
private int snapshotsInSyncEvents = 0 ;
223
224
224
225
/** An executor to use for test callbacks. */
225
- private final RoboExecutorService backgroundExecutor = new RoboExecutorService ();
226
+ private final ExecutorService backgroundExecutor = new InlineExecutorService ();
226
227
227
228
/** The current user for the SyncEngine. Determines which mutation queue is active. */
228
229
private User currentUser ;
You can’t perform that action at this time.
0 commit comments