Skip to content

Commit 6b66289

Browse files
authored
test: Add missing test table cleanup for MaterializedViewIT (#2721)
Change-Id: I1281568894ac2d04f0aafe0aa7f4efa7570ae58a Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Rollback plan is reviewed and LGTMed - [ ] All new data plane features have a completed end to end testing plan Fixes #<issue_number_goes_here> ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md).
1 parent 62ffd1b commit 6b66289

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableMaterializedViewIT.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import java.io.IOException;
3737
import java.util.List;
3838
import java.util.logging.Logger;
39+
import org.junit.After;
3940
import org.junit.Before;
4041
import org.junit.BeforeClass;
4142
import org.junit.ClassRule;
@@ -46,6 +47,7 @@
4647

4748
@RunWith(JUnit4.class)
4849
public class BigtableMaterializedViewIT {
50+
4951
@ClassRule public static final TestEnvRule testEnvRule = new TestEnvRule();
5052
@Rule public final PrefixGenerator prefixGenerator = new PrefixGenerator();
5153
private static final Logger LOGGER = Logger.getLogger(BigtableMaterializedViewIT.class.getName());
@@ -71,6 +73,13 @@ public void setUp() throws InterruptedException, IOException {
7173
testTable = createTestTable(testEnvRule.env().getTableAdminClient());
7274
}
7375

76+
@After
77+
public void tearDown() throws InterruptedException {
78+
if (testTable != null) {
79+
testEnvRule.env().getTableAdminClient().deleteTable(testTable.getId());
80+
}
81+
}
82+
7483
@Test
7584
public void createMaterializedViewAndGetMaterializedViewTest() {
7685
String materializedViewId = prefixGenerator.newPrefix();

0 commit comments

Comments
 (0)