[
https://issues.apache.org/jira/browse/BEAM-14423?focusedWorklogId=767462&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-767462
]
ASF GitHub Bot logged work on BEAM-14423:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 06/May/22 23:39
Start Date: 06/May/22 23:39
Worklog Time Spent: 10m
Work Description: pabloem commented on code in PR #17559:
URL: https://github.com/apache/beam/pull/17559#discussion_r867267191
##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIOTest.java:
##########
@@ -296,6 +297,53 @@ public void
testReadWithRuntimeParametersValidationDisabled() {
p.apply(read);
}
+ @Test
+ public void testReadWithReaderStartFailed() throws IOException {
+ FailureBigtableService failureService =
+ new FailureBigtableService(
+ new
AutoValue_BigtableIOTest_FailureOptions.Builder().setFailAtStart(true).build());
Review Comment:
I would advise you to use the Builder in the autovalue class, so that you're
not creating the AutoValue_* class, and instead are using AutoValue builders
the way they're designed:
https://github.com/google/auto/blob/master/value/userguide/builders.md
```suggestion
BigtableIOTest.builder().setFailAtStart(true).build());
```
I know this is a test file, so it's not so critical - but our users also use
tests as inspiration, so let's keep a good practice here? : )
Issue Time Tracking
-------------------
Worklog Id: (was: 767462)
Time Spent: 1h (was: 50m)
> BigtableIO.BigtableReader needs exception handling test
> -------------------------------------------------------
>
> Key: BEAM-14423
> URL: https://issues.apache.org/jira/browse/BEAM-14423
> Project: Beam
> Issue Type: Test
> Components: io-java-gcp
> Reporter: Yi Hu
> Assignee: Yi Hu
> Priority: P2
> Time Spent: 1h
> Remaining Estimate: 0h
>
> To make sure that we're dealing with exceptions appropriately, we need to
> show in tests that the behavior is appropriate.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)