You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Luke Cwik (Jira)" <ji...@apache.org> on 2020/08/18 23:00:07 UTC

[jira] [Comment Edited] (BEAM-10752) [beam_PostCommit_SQL] PubsubToBigqueryIT.testSimpleInsert failed

    [ https://issues.apache.org/jira/browse/BEAM-10752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17180149#comment-17180149 ] 

Luke Cwik edited comment on BEAM-10752 at 8/18/20, 10:59 PM:
-------------------------------------------------------------

The issue is that [PubsubSchemaIOProvider.java|https://github.com/apache/beam/blob/0cc86673845ae0368f0920930f9745ccd8d86db2/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubSchemaIOProvider.java#L228] uses a pubsub topic which means that any messages published before the topic is created won't be visible yet the tests perform

{code:java}
pipeline.run();  // blockOnRun=false
pubsub.publish(...messages...);
{code}
which is an inherent race condition in the test.

I changed the code to:
{code:java}
pipeline.run();  // blockOnRun=false
Thread.sleep(30_000);
pubsub.publish(...messages...);
{code}
as a test and the test passed.


was (Author: lcwik):
The issue is that [PubsubSchemaIOProvider.java|https://github.com/apache/beam/blob/0cc86673845ae0368f0920930f9745ccd8d86db2/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubSchemaIOProvider.java#L228] uses a pubsub topic which means that any messages published before the topic is created won't be visible yet the tests perform

{code:java}
pipeline.run();  // blockOnRun=false
pubsub.publish(...messages...);
{code}
which is an inherent race condition in the test.


> [beam_PostCommit_SQL] PubsubToBigqueryIT.testSimpleInsert failed
> ----------------------------------------------------------------
>
>                 Key: BEAM-10752
>                 URL: https://issues.apache.org/jira/browse/BEAM-10752
>             Project: Beam
>          Issue Type: Bug
>          Components: dsl-sql, test-failures
>            Reporter: Robin Qiu
>            Assignee: Brian Hulette
>            Priority: P1
>              Labels: currently-failing
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> java.lang.AssertionError: Expected: iterable with items [<Row:[3, foo]>, <Row:[5, bar]>, <Row:[7, baz]>] in any order but: no item matches: <Row:[3, foo]>, <Row:[5, bar]>, <Row:[7, baz]> in []
> [https://ci-beam.apache.org/job/beam_PostCommit_SQL/5208/testReport/junit/org.apache.beam.sdk.extensions.sql/PubsubToBigqueryIT/testSimpleInsert/]
>  
> This happened after https://issues.apache.org/jira/browse/BEAM-10716
> Maybe the pubsub subscription is accidentally deleted? Brian could you please take a look?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)