Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Failing Test]: JmsIOTest. testCheckpointMark flaky #30225

Open
16 tasks
Abacn opened this issue Feb 6, 2024 · 1 comment
Open
16 tasks

[Failing Test]: JmsIOTest. testCheckpointMark flaky #30225

Abacn opened this issue Feb 6, 2024 · 1 comment

Comments

@Abacn
Copy link
Contributor

Abacn commented Feb 6, 2024

What happened?

Example run: https://github.com/apache/beam/runs/21250090063 (an PR unrelated to Jms):

java.lang.AssertionError
	at org.junit.Assert.fail(Assert.java:87)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertTrue(Assert.java:53)
	at org.apache.beam.sdk.io.jms.JmsIOTest.testCheckpointMark(JmsIOTest.java:463)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Fails at here:

In fact, consumer.receiveNoWait call at

Message message = this.consumer.receiveNoWait();

never guarantees a message will be returned when there are still unacked message on the server: https://stackoverflow.com/questions/36626634/does-jms-receivenowait-guarantee-message-delivery-when-messages-are-available

So there is a chance that the call returns null and fails assert

Issue Failure

Failure: Test is flaky

Issue Priority

Priority: 2 (backlog / disabled test but we think the product is healthy)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner
@Abacn
Copy link
Contributor Author

Abacn commented Feb 7, 2024

The underlying cause is that there is no guarantee receiveNoWait here:

Message message = this.consumer.receiveNoWait();

return a nonnull value when there is pending record in the server side, per JMS specification. This can also affects integration test for the same reason, as we see not all records are read within timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant