Commit e4fdc6f
authored
test(spanner): restrict pagination test to explicitly created database (#14043)
The `ITBackupTest.testPagination` method previously listed all backups
on the instance and asserted that only a single page of results would be
returned (`assertFalse(page.hasNextPage())`). When running on shared
integration test instances (`spanner.testenv.instance`), this assertion
would fail if backups from other test runs were present on the instance.
This commit updates the pagination API calls to use
`Options.filter("database:" + databaseId)`, ensuring that the test only
paginates over the backups associated with the uniquely generated
database for the active test run. This prevents the test from failing
due to unrelated backups in the shared test environment.1 parent 96a7e6f commit e4fdc6f
1 file changed
Lines changed: 8 additions & 7 deletions
File tree
- java-spanner/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/slow
java-spanner/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/slow/ITBackupTest.java
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| |||
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
708 | | - | |
| 708 | + | |
709 | 709 | | |
| 710 | + | |
| 711 | + | |
710 | 712 | | |
711 | 713 | | |
712 | 714 | | |
713 | 715 | | |
714 | | - | |
| 716 | + | |
715 | 717 | | |
716 | 718 | | |
717 | 719 | | |
718 | | - | |
| 720 | + | |
719 | 721 | | |
720 | 722 | | |
721 | | - | |
722 | 723 | | |
723 | 724 | | |
724 | 725 | | |
| |||
745 | 746 | | |
746 | 747 | | |
747 | 748 | | |
748 | | - | |
| 749 | + | |
749 | 750 | | |
750 | 751 | | |
751 | 752 | | |
752 | | - | |
| 753 | + | |
753 | 754 | | |
754 | 755 | | |
755 | 756 | | |
| |||
0 commit comments