File tree Expand file tree Collapse file tree 9 files changed +25
-13
lines changed
firebase-firestore/src/test/java/com/google/firebase/firestore
main/java/com/google/firebase/perf
test/java/com/google/firebase/perf Expand file tree Collapse file tree 9 files changed +25
-13
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 ;
Original file line number Diff line number Diff line change 29
29
import com .google .firebase .inject .Provider ;
30
30
import com .google .firebase .installations .FirebaseInstallationsApi ;
31
31
import com .google .firebase .perf .config .ConfigResolver ;
32
+ import com .google .firebase .perf .config .RemoteConfigManager ;
32
33
import com .google .firebase .perf .internal .GaugeManager ;
33
- import com .google .firebase .perf .internal .RemoteConfigManager ;
34
34
import com .google .firebase .perf .logging .AndroidLogger ;
35
35
import com .google .firebase .perf .metrics .HttpMetric ;
36
36
import com .google .firebase .perf .metrics .Trace ;
Original file line number Diff line number Diff line change 39
39
import com .google .firebase .perf .config .ConfigurationConstants .TraceEventCountBackground ;
40
40
import com .google .firebase .perf .config .ConfigurationConstants .TraceEventCountForeground ;
41
41
import com .google .firebase .perf .config .ConfigurationConstants .TraceSamplingRate ;
42
- import com .google .firebase .perf .internal .RemoteConfigManager ;
43
42
import com .google .firebase .perf .logging .AndroidLogger ;
44
43
import com .google .firebase .perf .util .ImmutableBundle ;
45
44
import com .google .firebase .perf .util .Optional ;
Original file line number Diff line number Diff line change 1
- // Copyright 2020 Google LLC
1
+ // Copyright 2021 Google LLC
2
2
//
3
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
4
// you may not use this file except in compliance with the License.
5
- //
6
5
// You may obtain a copy of the License at
6
+ //
7
7
// http://www.apache.org/licenses/LICENSE-2.0
8
8
//
9
9
// Unless required by applicable law or agreed to in writing, software
12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- package com .google .firebase .perf .internal ;
15
+ package com .google .firebase .perf .config ;
16
16
17
17
import android .content .Context ;
18
18
import android .content .pm .PackageInfo ;
Original file line number Diff line number Diff line change 21
21
import com .google .firebase .installations .FirebaseInstallationsApi ;
22
22
import com .google .firebase .perf .FirebasePerformance ;
23
23
import com .google .firebase .perf .config .ConfigResolver ;
24
+ import com .google .firebase .perf .config .RemoteConfigManager ;
24
25
import com .google .firebase .perf .internal .GaugeManager ;
25
- import com .google .firebase .perf .internal .RemoteConfigManager ;
26
26
import com .google .firebase .remoteconfig .RemoteConfigComponent ;
27
27
import dagger .Module ;
28
28
import dagger .Provides ;
Original file line number Diff line number Diff line change 34
34
import com .google .firebase .installations .FirebaseInstallationsApi ;
35
35
import com .google .firebase .perf .config .ConfigResolver ;
36
36
import com .google .firebase .perf .config .DeviceCacheManager ;
37
+ import com .google .firebase .perf .config .RemoteConfigManager ;
37
38
import com .google .firebase .perf .internal .GaugeManager ;
38
- import com .google .firebase .perf .internal .RemoteConfigManager ;
39
39
import com .google .firebase .perf .util .Constants ;
40
40
import com .google .firebase .perf .util .ImmutableBundle ;
41
41
import com .google .firebase .remoteconfig .RemoteConfigComponent ;
Original file line number Diff line number Diff line change 31
31
import androidx .test .core .app .ApplicationProvider ;
32
32
import com .google .firebase .perf .BuildConfig ;
33
33
import com .google .firebase .perf .FirebasePerformanceTestBase ;
34
- import com .google .firebase .perf .internal .RemoteConfigManager ;
35
34
import com .google .firebase .perf .util .ImmutableBundle ;
36
35
import com .google .firebase .perf .util .Optional ;
37
36
import org .junit .Before ;
Original file line number Diff line number Diff line change 1
- // Copyright 2020 Google LLC
1
+ // Copyright 2021 Google LLC
2
2
//
3
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
4
// you may not use this file except in compliance with the License.
5
- //
6
5
// You may obtain a copy of the License at
6
+ //
7
7
// http://www.apache.org/licenses/LICENSE-2.0
8
8
//
9
9
// Unless required by applicable law or agreed to in writing, software
12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- package com .google .firebase .perf .internal ;
15
+ package com .google .firebase .perf .config ;
16
16
17
17
import static com .google .common .truth .Truth .assertThat ;
18
18
import static java .nio .charset .StandardCharsets .UTF_8 ;
You can’t perform that action at this time.
0 commit comments