Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firestore: Remove obsolete special case from tests when verifying "missing index" error message in non-default DB #5632

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
}
}
Loading