Skip to content

Commit 85c3514

Browse files
committed
Review comments
1 parent bc71a17 commit 85c3514

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

firebase-functions/src/androidTest/java/com/google/firebase/functions/CallTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import com.google.android.gms.tasks.Task;
2626
import com.google.android.gms.tasks.Tasks;
2727
import com.google.firebase.FirebaseApp;
28+
import com.google.firebase.emulators.EmulatedServiceSettings;
2829
import com.google.firebase.functions.FirebaseFunctionsException.Code;
2930
import java.util.Arrays;
3031
import java.util.HashMap;
@@ -39,6 +40,8 @@
3940
public class CallTest {
4041
private static FirebaseApp app;
4142

43+
private static final EmulatedServiceSettings NO_EMULATOR = null;
44+
4245
@BeforeClass
4346
public static void setUp() {
4447
FirebaseApp.initializeApp(InstrumentationRegistry.getContext());
@@ -91,7 +94,7 @@ public void testToken() throws InterruptedException, ExecutionException {
9194
HttpsCallableContext context = new HttpsCallableContext("token", null);
9295
return Tasks.forResult(context);
9396
},
94-
null);
97+
NO_EMULATOR);
9598

9699
HttpsCallableReference function = functions.getHttpsCallable("tokenTest");
97100
Task<HttpsCallableResult> result = function.call(new HashMap<>());
@@ -112,7 +115,7 @@ public void testInstanceId() throws InterruptedException, ExecutionException {
112115
HttpsCallableContext context = new HttpsCallableContext(null, "iid");
113116
return Tasks.forResult(context);
114117
},
115-
null);
118+
NO_EMULATOR);
116119

117120
HttpsCallableReference function = functions.getHttpsCallable("instanceIdTest");
118121
Task<HttpsCallableResult> result = function.call(new HashMap<>());

firebase-functions/src/main/java/com/google/firebase/functions/FirebaseFunctions.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import com.google.android.gms.tasks.Tasks;
2929
import com.google.firebase.FirebaseApp;
3030
import com.google.firebase.emulators.EmulatedServiceSettings;
31-
import com.google.firebase.emulators.EmulatorSettings;
3231
import com.google.firebase.emulators.FirebaseEmulator;
3332
import com.google.firebase.functions.FirebaseFunctionsException.Code;
3433
import java.io.IOException;
@@ -54,6 +53,10 @@ public class FirebaseFunctions {
5453
* Emulator identifier, see {@link
5554
* com.google.firebase.emulators.EmulatorSettings.Builder#addEmulatedService(FirebaseEmulator,
5655
* EmulatedServiceSettings)}
56+
*
57+
* <p>TODO(samstern): Un-hide this once Firestore, Database, and Functions are implemented
58+
*
59+
* @hide
5760
*/
5861
public static final FirebaseEmulator EMULATOR = FirebaseEmulator.forName("functions");
5962

@@ -215,9 +218,7 @@ URL getURL(String function) {
215218
* https://firebase.google.com/docs/functions/local-emulator
216219
*
217220
* @param origin The origin of the local emulator, such as "http://10.0.2.2:5005".
218-
* @deprecated see {@link FirebaseApp#enableEmulators(EmulatorSettings)}
219221
*/
220-
@Deprecated
221222
public void useFunctionsEmulator(@NonNull String origin) {
222223
Preconditions.checkNotNull(origin, "origin cannot be null");
223224
urlFormat = origin + "/%2$s/%1$s/%3$s";

0 commit comments

Comments
 (0)