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

Do the tests pass? #497

Closed
wants to merge 1 commit into from
Closed

Do the tests pass? #497

wants to merge 1 commit into from

Conversation

timja
Copy link
Member

@timja timja commented Jan 28, 2020

JENKINS-xxxxx - summarize pull request in one line

Describe the big picture of your changes here to explain to the maintainers why this pull request should be accepted.
If it fixes a bug or resolves a feature request, include a link to the issue.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have referenced the Jira issue related to my changes in one or more commit messages
  • I have added tests that verify my changes
  • Unit tests pass locally with my changes
  • I have added documentation as necessary
  • No Javadoc warnings were introduced with my changes
  • No spotbugs warnings were introduced with my changes
  • I have interactively tested my changes

Types of changes

What types of changes does your code introduce? Put an x in the boxes that apply

  • Infrastructure change (non-breaking change which updates dependencies or improves infrastructure)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Further comments

If this is a relatively large or complex change, start the discussion by explaining why you chose the solution you did and what alternatives you considered.

@timja
Copy link
Member Author

timja commented Jan 28, 2020

Locally I'm seeing:

junit.framework.AssertionFailedError: heads is {refs/heads/tests/getSubmodules-jgit=AnyObjectId[607d87f71911ff66db898ccb338ec73d6668edde], refs/heads/1.17.x=AnyObjectId[24312dae725f11ba6508bc649e943aba96512f28], refs/heads/master=AnyObjectId[738c426f29e5c6cb75d2c9e8286a77c751aa9d5b], refs/heads/dependabot/maven/master/io.jenkins.tools.bom-bom-2.138.x-4=AnyObjectId[86aa965174abe8d04931e16785af0c23660587d9], refs/heads/1.21.x=AnyObjectId[35bbe21451c1f38afee60cafef5925a509254c3f], refs/heads/tests/getSubmodules=AnyObjectId[a6dd186704985fdb0c60e60f5c6ea7ea35e082e5], refs/heads/1.4.x=AnyObjectId[7e351a9255ce5c4c5bb490572ccd54a2a26d3b5a], refs/heads/stable-2.x=AnyObjectId[80da647de77984db28912ed530ce90ca8bb1dc07], refs/heads/tests/notSubmodules=AnyObjectId[f04fae26f6b612c4a575314222d72c20ca4090a5]} 
Expected :AnyObjectId[738c426f29e5c6cb75d2c9e8286a77c751aa9d5b]
Actual   :AnyObjectId[86aa965174abe8d04931e16785af0c23660587d9]

and on the bom PR:
https://ci.jenkins.io/blue/rest/organizations/jenkins/pipelines/Tools/pipelines/bom/branches/PR-172/runs/10/nodes/146/steps/3231/log/?start=0

@timja
Copy link
Member Author

timja commented Jan 28, 2020

@MarkEWaite tests don't pass CI with no changes 😢

I've had a bit of a look but the test is very specific to existing state and I don't really understand it

<1s
linux-8-2.176.3 / Build (linux-8-2.176.3) / test_getHeadRev_wildcards – org.jenkinsci.plugins.gitclient.CliGitAPIImplTest
<1s
Error
heads is {refs/heads/tests/getSubmodules-jgit=AnyObjectId[607d87f71911ff66db898ccb338ec73d6668edde], refs/heads/1.17.x=AnyObjectId[24312dae725f11ba6508bc649e943aba96512f28], refs/heads/master=AnyObjectId[738c426f29e5c6cb75d2c9e8286a77c751aa9d5b], refs/heads/dependabot/maven/master/io.jenkins.tools.bom-bom-2.138.x-4=AnyObjectId[86aa965174abe8d04931e16785af0c23660587d9], refs/heads/1.21.x=AnyObjectId[35bbe21451c1f38afee60cafef5925a509254c3f], refs/heads/tests/getSubmodules=AnyObjectId[a6dd186704985fdb0c60e60f5c6ea7ea35e082e5], refs/heads/1.4.x=AnyObjectId[7e351a9255ce5c4c5bb490572ccd54a2a26d3b5a], refs/heads/stable-2.x=AnyObjectId[80da647de77984db28912ed530ce90ca8bb1dc07], refs/heads/tests/notSubmodules=AnyObjectId[f04fae26f6b612c4a575314222d72c20ca4090a5]} expected:<AnyObjectId[738c426f29e5c6cb75d2c9e8286a77c751aa9d5b]> but was:<AnyObjectId[86aa965174abe8d04931e16785af0c23660587d9]>
Stacktrace
junit.framework.AssertionFailedError: heads is {refs/heads/tests/getSubmodules-jgit=AnyObjectId[607d87f71911ff66db898ccb338ec73d6668edde], refs/heads/1.17.x=AnyObjectId[24312dae725f11ba6508bc649e943aba96512f28], refs/heads/master=AnyObjectId[738c426f29e5c6cb75d2c9e8286a77c751aa9d5b], refs/heads/dependabot/maven/master/io.jenkins.tools.bom-bom-2.138.x-4=AnyObjectId[86aa965174abe8d04931e16785af0c23660587d9], refs/heads/1.21.x=AnyObjectId[35bbe21451c1f38afee60cafef5925a509254c3f], refs/heads/tests/getSubmodules=AnyObjectId[a6dd186704985fdb0c60e60f5c6ea7ea35e082e5], refs/heads/1.4.x=AnyObjectId[7e351a9255ce5c4c5bb490572ccd54a2a26d3b5a], refs/heads/stable-2.x=AnyObjectId[80da647de77984db28912ed530ce90ca8bb1dc07], refs/heads/tests/notSubmodules=AnyObjectId[f04fae26f6b612c4a575314222d72c20ca4090a5]} expected:<AnyObjectId[738c426f29e5c6cb75d2c9e8286a77c751aa9d5b]> but was:<AnyObjectId[86aa965174abe8d04931e16785af0c23660587d9]>
	at junit.framework.Assert.fail(Assert.java:57)
	at junit.framework.Assert.failNotEquals(Assert.java:329)

@timja timja requested a review from MarkEWaite January 28, 2020 20:47
@MarkEWaite
Copy link
Contributor

Yes, the test is very specific to the state of the git client plugin repository. It assumes a very specific set of branch names in the repository on GitHub. Should be relatively easy to fix or to rework the test to not be coupled to external repo content.

@MarkEWaite
Copy link
Contributor

Closing so that I can focus on fixing the problem (when I only have a Chromebook with me)

@MarkEWaite MarkEWaite closed this Jan 28, 2020
@timja timja deleted the patch-1 branch January 28, 2020 20:51
@MarkEWaite
Copy link
Contributor

MarkEWaite commented Jan 28, 2020

See #496 for the workaround.

Repair needs to retire the GitAPITestCase completely (JUnit 3 code) and replace it with better isolated tests that use either JUnit 4 or JUnit 5.

@MarkEWaite MarkEWaite added test Automated test addition or improvement breaking Breaks compatibility with previous releases labels Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaks compatibility with previous releases test Automated test addition or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants