Skip to content

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

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

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 @@ -1101,10 +1101,6 @@ public void aggregateQueryShouldFailWithMessageWithConsoleLinkIfMissingIndex() {

Throwable throwable = executionException.getCause();
assertThat(throwable).hasMessageThat().ignoringCase().contains("index");
// TODO(b/316359394) Remove this check for the default databases once cl/582465034 is rolled out
// to production.
if (collection.getFirestore().getOptions().getDatabaseId().equals("(default)")) {
assertThat(throwable).hasMessageThat().contains("https://console.firebase.google.com");
}
assertThat(throwable).hasMessageThat().contains("https://console.firebase.google.com");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -386,11 +386,7 @@ public void countQueryShouldFailWithMessageWithConsoleLinkIfMissingIndex() {

Throwable throwable = executionException.getCause();
assertThat(throwable).hasMessageThat().ignoringCase().contains("index");
// TODO(b/316359394) Remove this check for the default databases once cl/582465034 is rolled out
// to production.
if (collection.getFirestore().getOptions().getDatabaseId().equals("(default)")) {
assertThat(throwable).hasMessageThat().contains("https://console.firebase.google.com");
}
assertThat(throwable).hasMessageThat().contains("https://console.firebase.google.com");
}

private CollectionReference createEmptyCollection() {
Expand Down