-
Notifications
You must be signed in to change notification settings - Fork 146
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
pom.xml:348-352: Enable RuleAssertionMessage. This rule... #2297
Comments
@volodya-lombrozo check this out: https://docs.pmd-code.org/latest/pmd_rules_apex_bestpractices.html#apexunittestclassshouldhaveasserts I suggest removing this check from JTCop |
@yegor256 I'm not sure about "removing". Maybe it's better just to disable that check by default. What do you think? |
@volodya-lombrozo @yegor256 for now
Here, assertion contains a stub message ( I think this todo should be removed, because main problem was solved, but first we need to resolve such contradiction. What do you think about disabling this jtcop rule by default? |
@volodya-lombrozo It seems like theres another bug. For example:
The test looks like this: @Test
void choosesTransformerFactoryInConcurrentEnvironment() {
for (final Class<? extends TransformerFactory> clazz : IntStream.range(0, 100).parallel()
.mapToObj(i -> TransformerFactory.newInstance().getClass())
.collect(Collectors.toList())) {
MatcherAssert.assertThat(
"TO ADD ASSERTION MESSAGE",
clazz,
Matchers.typeCompatibleWith(TransformerFactoryImpl.class)
);
}
} Will you fix it? It looks like check ignores asserts inside of loops. |
@volodya-lombrozo @yegor256 also there was cases, that was not detected by @Test
void failsOnTimeout(@TempDir final Path temp) {
Assertions.assertThrows(
IllegalStateException.class,
() -> new FakeMaven(temp)
.withHelloWorld()
.with("timeout", 0)
.execute(InfiniteMojo.class),
);
} For some reasons |
For sure. Again, could report a bug in jtcop, please?
Yes, of course. |
@volodya-lombrozo could you check this one too, please volodya-lombrozo/jtcop#357. It also related to this ticket. |
@c71n93 Yes, I'll take a look. |
The puzzle
2171-74d15acf
from #2171 has to be resolved:eo/pom.xml
Lines 348 to 352 in 992706f
The puzzle was created by rultor on 21-Jul-23.
Estimate: 30 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
The text was updated successfully, but these errors were encountered: