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

com.hazelcast.internal.serialization.impl.compact.schema.CompactSchemaReplicationSlowTest [API-2218] [HZ-4566] #26245

Open
olukas opened this issue Feb 5, 2024 · 14 comments

Comments

@olukas
Copy link
Contributor

olukas commented Feb 5, 2024

master (commit 5ecb79121243fb5470750c592c41e63690a0b737)

Failed on zing-17: https://jenkins.hazelcast.com/job/Hazelcast-master-ZingJDK17-nightly/63/testReport/com.hazelcast.internal.serialization.impl.compact.schema/CompactSchemaReplicationSlowTest/

Following tests failed:

  • testSchemaReplication_whenAMemberThrowsRetryableExceptionAllTheTime_duringPreparationPhase
  • testSchemaReplication_whenAMemberThrowsRetryableExceptionAllTheTime_duringAcknowledgmentPhase
Stacktrace:
junit.framework.AssertionFailedError: Expected com.hazelcast.nio.serialization.HazelcastSerializationException to be thrown, but nothing was thrown.
	at com.hazelcast.test.HazelcastTestSupport.assertThrows(HazelcastTestSupport.java:1433)
	at com.hazelcast.internal.serialization.impl.compact.schema.CompactSchemaReplicationSlowTest.testSchemaReplication_whenAMemberThrowsRetryableExceptionAllTheTime_duringPreparationPhase(CompactSchemaReplicationSlowTest.java:55)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at com.hazelcast.test.FailOnTimeoutStatement$CallableStatement.call(FailOnTimeoutStatement.java:115)
	at com.hazelcast.test.FailOnTimeoutStatement$CallableStatement.call(FailOnTimeoutStatement.java:107)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.lang.Thread.run(Thread.java:891)

Standard output can be found here - https://s3.console.aws.amazon.com/s3/buckets/j-artifacts/Hazelcast-master-ZingJDK17-nightly/63/

@olukas olukas added this to the 5.4 Backlog milestone Feb 5, 2024
@github-actions github-actions bot changed the title com.hazelcast.internal.serialization.impl.compact.schema.CompactSchemaReplicationSlowTest com.hazelcast.internal.serialization.impl.compact.schema.CompactSchemaReplicationSlowTest [API-2218] Feb 19, 2024
Copy link
Contributor

Internal Jira issue: API-2218

@github-actions github-actions bot changed the title com.hazelcast.internal.serialization.impl.compact.schema.CompactSchemaReplicationSlowTest [API-2218] com.hazelcast.internal.serialization.impl.compact.schema.CompactSchemaReplicationSlowTest [API-2218] [HZ-4566] Mar 8, 2024
Copy link
Contributor

github-actions bot commented Mar 8, 2024

Internal Jira issue: HZ-4566

devOpsHazelcast pushed a commit that referenced this issue Mar 19, 2024
…t` [HZ-4566][API-2218] (#1133)

[Several tests are
failing](https://hazelcast.atlassian.net/browse/HZ-2245) only on Azul
Prime JDKs due to an incompatibility between it and Mockito.

Although in most cases we can replace a mocked concrete class with a
mocked interface instead, here it's the `spy` functionality being used
on real instances and there's no such workaround.

To address this:
- Refactored `CompactSchemaReplicationSlowTest` and
`CompactSchemaReplicationTest` to move replicated logic into parent
`CompactSchemaReplicationTestBase`
- _Where possible_ replaced checking whether a method was called (via
`spy`) to instead check the effect of that method
- E.G. rather than checking `onSchemaAckRequest` is never called,
instead check that the `replicationStatus` != `REPLICATED`, which is the
effect of the method being called.
- this cannot be done in every scenario (e.g. asserting that a method is
called exactly 100 times when it has no side effect), and while it
_would_ be possible to replicate the `spy` functionality with some
invocation-counting delegate wrapper, as the tests pass this doesn't
_appear_ to be necessary
- Finally, understanding that checking a method is/isn't called is
equivalent to checking the `replicationStatus`, identified some of the
assertions were duplicated and redundant - now removed

I *have* been able to [test this fix in a Jenkins
job](https://hazelcast.atlassian.net/browse/HZ-4566?focusedCommentId=95093)
to give some confidence it addresses the issue.

Fixes: [HZ-4566](https://hazelcast.atlassian.net/browse/HZ-4566),
[API-2218](https://hazelcast.atlassian.net/browse/API-2218),
#26245

[HZ-4566]:
https://hazelcast.atlassian.net/browse/HZ-4566?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

GitOrigin-RevId: 79092b41a4bc0c870f47a6fddd6cd73c41dc7682
@AyberkSorgun AyberkSorgun modified the milestones: 5.4 Backlog, 5.5.0 Mar 21, 2024
@AleksPeychev AleksPeychev reopened this Mar 26, 2024
@sumnerib
Copy link
Contributor

sumnerib commented Jun 17, 2024

@sumnerib
Copy link
Contributor

Fails constantly on zing-17

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

8 participants