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

Fix a TCK regression #195

Merged
merged 4 commits into from Aug 19, 2020
Merged

Fix a TCK regression #195

merged 4 commits into from Aug 19, 2020

Conversation

FroMage
Copy link
Contributor

@FroMage FroMage commented Aug 18, 2020

That only happens on Quarkus because the current TCK doesn't test with an executor service, and Quarkus has one. On Quarkus we'll still have two tests failing until MP-CP releases the new TCK.

Now I've tested with the updated TCK at eclipse/microprofile-context-propagation#197 and we pass.

Also fixed a few bugs spotted while writing the new TCK bits.


public CompletableFutureWrapper(SmallRyeThreadContext context, CompletableFuture<T> f, Executor executor, boolean minimal) {
public final static int FLAG_MINIMAL = 1 << 0;
public final static int FLAG_DEPENDENT = 1 << 1;
Copy link
Contributor

@manovotn manovotn Aug 18, 2020

Choose a reason for hiding this comment

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

These are really hard to decipher. Was there any special reason why ordinary conditions wouldn't work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was at the point where I had two boolean parameters to the constructor, and that's where normally we switch to enums, but I figured creating two enums Something.MINIMAL/NORMAL SomethingElse.DEPENDENT/WRAPPER didn't feel a lot better than flags.
If you feel strongly in favour of two enums, or perhaps using an EnumSet in a single enum, I can change it, but two boolean in a row are a good reason to find an alternative.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. I don't really have a strong argument to convince you, it's just that for me the readability of bitwise operations for conditions was always really low. If you feel like it's the easiest way to do it, keep it :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's fine.

@FroMage FroMage merged commit 8a37816 into smallrye:master Aug 19, 2020
@FroMage FroMage added this to the 1.0.16 milestone Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants