-
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
Fix PCT failures #199
Fix PCT failures #199
Conversation
src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right code to patch at least.
src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java
Outdated
Show resolved
Hide resolved
src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java
Outdated
Show resolved
Hide resolved
src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java
Outdated
Show resolved
Hide resolved
Thanks, looking close. |
I think I've got the lot now, although the build is still sensitive to timeouts. How would I test this locally with PCT? |
https://github.com/jenkinsci/plugin-compat-tester#configuration there is an option to specify a local directory to use for the plugin sources, rather than checking out a tag. If you happen to know the specific extensions causing the failures, it may be easier to just add that other plugin to the test classpath. |
I've run PCT against this with the following arguments:
The tests this was meant to fix seem to be fixed. A couple of unrelated tests in branch-api failed, but I think it could just be some encoding issue running in the Docker PCT harness. Log below:
|
Not sure about the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still weakening existing tests a bit, but close.
src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java
Outdated
Show resolved
Hide resolved
src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java
Show resolved
Hide resolved
src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java
Outdated
Show resolved
Hide resolved
src/test/java/jenkins/branch/CustomOrganizationFolderDescriptorTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK for me, assuming you retest in PCT.
Retested. I've since found 2 more tests that had also failed in the pipeline-model-definition fork of BOM (https://ci.jenkins.io/blue/organizations/jenkins/Tools%2Fbom/detail/PR-179/27/pipeline/#step-6960-log-1332), which I had overlooked. They have no error message:
There's also the 3 tests with "Failure ‘$’ is an unsafe character" errors not mentioned in the PMD run, and probably just caused by the harness:
|
If I run Is Surefire treating an assumption failure (which should produce an ignored test) as a full test failure in the PCT harness? |
Should not. Anyway I checked https://ci.jenkins.io/job/Tools/job/bom/job/PR-179/27/testReport/ and do not see any failures listed from what you mention in #199 (comment): they are all either passed or skipped. |
Is there a reference? What is “PMD” in this context? |
PMD was the pipeline-model-definition fork of BOM. Don't know why I abbreviated it 🤦 I was thinking of the same test report as you, but as you've pointed out, while the two tests appeared in the build log as failures (https://ci.jenkins.io/blue/organizations/jenkins/Tools%2Fbom/detail/PR-179/27/pipeline/#step-6960-log-1332) they didn't appear as failures in the test report. If we're going by the test report tab then we can say they're not a problem. |
Well Surefire first prints
then later lists it under
but I guess that is just a buglet in Surefire display. |
... Each of these looks like test failures due to this change: jenkinsci/jenkins@f176292 |
jenkinsci/jenkins#4684 for the better link/backlink. Those issues look distinct. For whatever reason they are not currently failing in |
…because this patch is not in 2.235, only 2.237 and proposed for 2.235.2. I will look at fixing but this would be in a separate PR, not needed immediately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, will trigger a rebuild now that #200 has been merged.
@@ -212,4 +212,4 @@ public String getDisplayName() { | |||
return names; | |||
} | |||
|
|||
} | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try to avoid unnecessary formatting changes.
} | |
} | |
import java.util.stream.Collectors; | ||
import java.util.stream.StreamSupport; | ||
|
||
public class Extracting<Element, Property> extends TypeSafeDiagnosingMatcher<Iterable<Element>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I would prefer to not add a utility like this to this specific plugin. I have wanted something like this occasionally though; perhaps it could be added to jenkins-test-harness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the PCT failures unearthed in jenkinsci/bom#179
To do: