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

adds jcstress for requester and responder operators #999

Merged
merged 2 commits into from Jun 7, 2021

Conversation

OlegDokuka
Copy link
Member

Adds JCStressTests Support

Motivation:

JCStress is a proven tool for making sure correctness of concurrency model used in various places

Modifications:

Adds list of JCStress tests

Result:

Better verification of concurrency related issues

Signed-off-by: Oleh Dokuka oleh.dokuka@icloud.com

@@ -186,6 +192,7 @@ public T block(@Nullable Duration timeout) {
@SuppressWarnings("unchecked")
final void terminate(Throwable t) {
if (isDisposed()) {
Operators.onErrorDropped(t, Context.empty());
return;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also update the copy in loadbalance?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

import reactor.core.publisher.Operators;
import reactor.util.context.Context;

public class StressSubscriber<T> implements CoreSubscriber<T> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StressTestSubscriber perhaps?

import reactor.core.CoreSubscriber;
import reactor.core.publisher.Operators;

public class StressSubscription<T> implements Subscription {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise StressTestSubscription

Comment on lines 61 to 82
public volatile boolean concurrentOnNext;

public volatile boolean concurrentOnError;

public volatile boolean concurrentOnComplete;

public volatile boolean concurrentOnSubscribe;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are set but not used. Am I missing something? There are others that are not used as well like droppedErrors, onNextDiscarded, and error.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is ported from reactor-core and should be used in the upcoming updates

@OlegDokuka OlegDokuka force-pushed the enhancement/jcstresstests branch 7 times, most recently from 893b7ea to 3296d72 Compare May 20, 2021 09:30
@OlegDokuka OlegDokuka marked this pull request as ready for review May 24, 2021 09:12
@OlegDokuka OlegDokuka force-pushed the enhancement/jcstresstests branch 4 times, most recently from 20ad9dc to c81c408 Compare May 24, 2021 13:46
@OlegDokuka OlegDokuka changed the title adds jcstress support adds jcstress for requester and responder operators May 24, 2021
@OlegDokuka OlegDokuka linked an issue May 24, 2021 that may be closed by this pull request
8 tasks
@OlegDokuka OlegDokuka changed the base branch from master to 1.0.x May 24, 2021 13:52
@OlegDokuka OlegDokuka changed the base branch from 1.0.x to master May 24, 2021 13:52
Signed-off-by: Oleh Dokuka <oleh.dokuka@icloud.com>
Signed-off-by: Oleh Dokuka <oleh.dokuka@icloud.com>
@OlegDokuka OlegDokuka merged commit de60762 into master Jun 7, 2021
@OlegDokuka OlegDokuka deleted the enhancement/jcstresstests branch June 7, 2021 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add JCStress for requester and responder Operators
2 participants