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

Quarkus LTS Upgrade to 3.8.4 #3477

Merged
merged 7 commits into from
May 2, 2024
Merged

Quarkus LTS Upgrade to 3.8.4 #3477

merged 7 commits into from
May 2, 2024

Conversation

return topicName.orElse(channelName);
}

Iterable<String> getPropertyNames() {
Copy link
Contributor

@fjtirado fjtirado Apr 22, 2024

Choose a reason for hiding this comment

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

I think this method and getOptionalValue should be protected rather than package

Copy link
Member Author

Choose a reason for hiding this comment

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

why protected and not default?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I forgot to mention why ;).
It is just styling. I prefer to use package for methods that might be called only within the package and protected for methods that might be inherited.
It is true that package is more restrictive (a protected can be inherited outside the original package) and you are only overriding from the unit test within the same package, theferore both are fine.

Copy link
Contributor

Choose a reason for hiding this comment

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

For example, when I see the change initially, I believe you have missed the private (later I see you are inheriting in the test), if you put protected, it is clear the purpose of change.

Copy link
Member Author

Choose a reason for hiding this comment

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

as this is in the personal preference realm, I'll leave as is as my personal preference is default scope as it's more restrictive and supposed to be used only by unit test to avoid using environment config

}
};

Iterable<String> getPropertyNames() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing override?

};

Iterable<String> getPropertyNames() {
return properties.keySet();
Copy link
Contributor

@fjtirado fjtirado Apr 22, 2024

Choose a reason for hiding this comment

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

same here, actually, to avoid code duplication (which I agree in test is mostly irrelevant) this probably deserve an inner class, TestQuarkusTopicDiscovery, with a constructor that accept a Map. Also, for an unmodifiable Map of reduced size like this one, Map.of should be used rather than the map initializer construct.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think code duplication is necessarily bad in unit tests, but I can adjust no problem.

Copy link
Contributor

@fjtirado fjtirado left a comment

Choose a reason for hiding this comment

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

Just really minor commens related with QuarkusTopicsDiscovered
Great job!

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>compile</scope>
Copy link
Contributor

@fjtirado fjtirado Apr 22, 2024

Choose a reason for hiding this comment

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

hmmm, are we completely sure that kogito-test-utils is only added as test scoped? if not, we might add with junit being added to set of the dependencies accidentally (probably it is all right, since we would have already realized that assert and rest assure were accidentally being added and it does not seem to be the case)

Copy link
Contributor

@fjtirado fjtirado Apr 22, 2024

Choose a reason for hiding this comment

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

Actually, why JUnit has to be added to the dependency set? Or the other way around, how this util test was working without this dependency?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can't remember what I had to add this, I'll try remove and see how it goes.

}
};
}

Copy link
Member Author

Choose a reason for hiding this comment

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

@fjtirado improved test code

@yesamer
Copy link
Contributor

yesamer commented Apr 22, 2024

I guess we could manage the maven update to 3.9.6 in this PR as well, @porcelli ?
#3479
WDYT?
(kie-apps and kogito-examples should be updated to maven 3.9.6 too)

@porcelli porcelli merged commit 4a7e77d into apache:main May 2, 2024
6 checks passed
rgdoliveira pushed a commit to rgdoliveira/kogito-runtimes that referenced this pull request May 7, 2024
* Upgrade to and align with Quarkus 3.8.2 LTS release.

* Upgrade to and align with Quarkus 3.8.3 LTS release.

* Upgrade to and align with Quarkus 3.8.4 LTS release.

* Upgrade to and align with Quarkus 3.8.4 LTS release.

* Improved test code to avoid duplication.

* Remove unnecessary util class execution, as Quarkus 3.8.x does not have the issue anymore.

* Upgrade tolatest embedded postgresql that is supposed to have the fix for test failures.
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.

6 participants