From 874e973562ca43275338751e9fe5526ca78c5de9 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Mon, 8 Jan 2024 14:13:27 -0500 Subject: [PATCH] Firestore: Remove obsolete special case from tests when verifying "missing index" error message in non-default DB --- .../google/firebase/firestore/AggregationTest.java | 11 +---------- .../java/com/google/firebase/firestore/CountTest.java | 11 +---------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/firebase-firestore/src/androidTest/java/com/google/firebase/firestore/AggregationTest.java b/firebase-firestore/src/androidTest/java/com/google/firebase/firestore/AggregationTest.java index 48cbf19402e..e910be5ba6d 100644 --- a/firebase-firestore/src/androidTest/java/com/google/firebase/firestore/AggregationTest.java +++ b/firebase-firestore/src/androidTest/java/com/google/firebase/firestore/AggregationTest.java @@ -37,7 +37,6 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import com.google.android.gms.tasks.Task; import com.google.common.truth.Truth; -import com.google.firebase.firestore.model.DatabaseId; import com.google.firebase.firestore.testutil.IntegrationTestUtil; import java.util.Collections; import java.util.Map; @@ -904,15 +903,7 @@ public void testAggregateErrorMessageShouldContainConsoleLinkIfMissingIndex() { Throwable cause = throwable.getCause(); Truth.assertThat(cause).hasMessageThat().ignoringCase().contains("index"); - // TODO(b/316359394) Remove this check for the default databases once cl/582465034 is rolled - // out to production. - if (collection - .firestore - .getDatabaseId() - .getDatabaseId() - .equals(DatabaseId.DEFAULT_DATABASE_ID)) { - Truth.assertThat(cause).hasMessageThat().contains("https://console.firebase.google.com"); - } + Truth.assertThat(cause).hasMessageThat().contains("https://console.firebase.google.com"); } @Test diff --git a/firebase-firestore/src/androidTest/java/com/google/firebase/firestore/CountTest.java b/firebase-firestore/src/androidTest/java/com/google/firebase/firestore/CountTest.java index 5fabaf019e3..0be4764061e 100644 --- a/firebase-firestore/src/androidTest/java/com/google/firebase/firestore/CountTest.java +++ b/firebase-firestore/src/androidTest/java/com/google/firebase/firestore/CountTest.java @@ -33,7 +33,6 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import com.google.android.gms.tasks.Task; -import com.google.firebase.firestore.model.DatabaseId; import com.google.firebase.firestore.testutil.IntegrationTestUtil; import java.util.Collections; import org.junit.After; @@ -277,14 +276,6 @@ public void testCountErrorMessageShouldContainConsoleLinkIfMissingIndex() { Throwable cause = throwable.getCause(); assertThat(cause).hasMessageThat().ignoringCase().contains("index"); - // TODO(b/316359394) Remove this check for the default databases once cl/582465034 is rolled - // out to production. - if (collection - .firestore - .getDatabaseId() - .getDatabaseId() - .equals(DatabaseId.DEFAULT_DATABASE_ID)) { - assertThat(cause).hasMessageThat().contains("https://console.firebase.google.com"); - } + assertThat(cause).hasMessageThat().contains("https://console.firebase.google.com"); } }