8000 docs: fix Bigtable flakey filters test (#8523) · rmc33/java-docs-samples@e15dfae · GitHub
[go: up one dir, main page]

Skip to content

Commit e15dfae

Browse files
docs: fix Bigtable flakey filters test (GoogleCloudPlatform#8523)
## Description Updated the table creation to remove any garbage collection. Default for most Bigtable clients is none, but for HBase client it was 1 max version for consistency with HBase API. Fixes https://togithub.com/GoogleCloudPlatform/java-docs-samples/issues/7963 Fixes https://togithub.com/GoogleCloudPlatform/java-docs-samples/issues/7964 Fixes https://togithub.com/GoogleCloudPlatform/java-docs-samples/issues/7965 Fixes https://togithub.com/GoogleCloudPlatform/java-docs-samples/issues/7966 Fixes https://togithub.com/GoogleCloudPlatform/java-docs-samples/issues/7967 Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google. ## Checklist - [ ] I have followed [Sample Format Guide](https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md) - [ ] `pom.xml` parent set to latest `shared-configuration` - [ ] Appropriate changes to README are included in PR - [ ] These samples need a new **API enabled** in testing projects to pass (let us know which ones) - [ ] These samples need a new/updated **env vars** in testing projects set to pass (let us know which ones) - [ ] **Tests** pass: `mvn clean verify` **required** - [ ] **Lint** passes: `mvn -P lint checkstyle:check` **required** - [ ] **Static Analysis**: `mvn -P lint clean compile pmd:cpd-check spotbugs:check` **advisory only** - [ ] This sample adds a new sample directory, and I updated the [CODEOWNERS file](https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/.github/CODEOWNERS) with the codeowners for this sample - [ ] This sample adds a new **Product API**, and I updated the [Blunderbuss issue/PR auto-assigner](https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/.github/blunderbuss.yml) with the codeowners for this sample - [ ] Please **merge** this PR for me once it is approved
1 parent 7c4f44b commit e15dfae

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

bigtable/hbase/snippets/src/test/java/com/example/bigtable/FiltersTest.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444

4545
public class FiltersTest {
4646

47-
@Rule public final MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule(5);
47+
@Rule
48+
public final MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule(5);
4849

4950
private static final String INSTANCE_ENV = "BIGTABLE_TESTING_INSTANCE";
5051
private static final String TABLE_ID =
@@ -77,8 +78,10 @@ public static void beforeClass() throws IOException {
7778
try (Admin admin = connection.getAdmin()) {
7879
admin.createTable(
7980
new HTableDescriptor(TableName.valueOf(TABLE_ID))
80-
.addFamily(new HColumnDescriptor(COLUMN_FAMILY_NAME_STATS))
81-
.addFamily(new HColumnDescriptor(COLUMN_FAMILY_NAME_DATA)));
81+
.addFamily(new HColumnDescriptor(COLUMN_FAMILY_NAME_STATS).setMaxVersions(
82+
Integer.MAX_VALUE))
83+
.addFamily(new HColumnDescriptor(COLUMN_FAMILY_NAME_DATA).setMaxVersions(
84+
Integer.MAX_VALUE)));
8285

8386
try (BufferedMutator batcher = connection.getBufferedMutator(TableName.valueOf(TABLE_ID))) {
8487

@@ -597,4 +600,4 @@ public void testFilterInterleave() {
597600
+ "\tos_build: PQ2A.190406.000 @%1$s",
598601
TIMESTAMP, TIMESTAMP_MINUS_HR));
599602
}
600-
}
603+
}

0 commit comments

Comments
 (0)
0