lnogueir commented on code in PR #22152:
URL: https://github.com/apache/beam/pull/22152#discussion_r919295674


##########
sdks/go/test/integration/io/fhirio/fhirio_test.go:
##########
@@ -178,102 +185,91 @@ func extractResourcePathFrom(resourceLocationURL string) 
(string, error) {
        return resourceLocationURL[startIdx:endIdx], nil
 }
 
-// Useful to prevent flaky results.
-func runWithBackoffRetries(t *testing.T, p *beam.Pipeline) error {
+func readTestTask(t *testing.T, s beam.Scope, testStoreInfo fhirStoreInfo) 
func() {
        t.Helper()
 
-       var err error
-       for attempt := 0; attempt < len(backoffDuration); attempt++ {
-               err = ptest.Run(p)
-               if err == nil {
-                       break
-               }
-               t.Logf("backoff %v after failure", backoffDuration[attempt])
-               time.Sleep(backoffDuration[attempt])
-       }
-       return err
-}
-
-func TestFhirIO_Read(t *testing.T) {
-       integration.CheckFilters(t)
-       checkFlags(t)
-
-       _, testResourcePaths, teardownFhirStore := setupFhirStoreWithData(t)
-       defer teardownFhirStore()
-
-       p, s, resourcePaths := ptest.CreateList(testResourcePaths)
-       resources, failedReads := fhirio.Read(s, resourcePaths)
-       passert.Empty(s, failedReads)
-       passert.Count(s, resources, "", len(testResourcePaths))
-
-       ptest.RunAndValidate(t, p)
-}
-
-func TestFhirIO_InvalidRead(t *testing.T) {
-       integration.CheckFilters(t)
-       checkFlags(t)
-
-       fhirStorePath, _, teardownFhirStore := setupFhirStoreWithData(t)
-       defer teardownFhirStore()
-
-       invalidResourcePath := fhirStorePath + "/fhir/Patient/invalid"
-       p, s, resourcePaths := ptest.CreateList([]string{invalidResourcePath})
-       resources, failedReads := fhirio.Read(s, resourcePaths)
+       testResources := append(testStoreInfo.resourcesPaths, 
testStoreInfo.path+"/fhir/Patient/invalid")

Review Comment:
   That's a good idea.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to