Skip to content
Permalink
Browse files

[JENKINS-43507] Bobby didn't believe the test was real

(the object instance itself is returned, but with all its field
instances recreated... something that I was trying to fix in
jenkinsci/jenkins#2736 but I hit issues.
I am switching to the more explicit comparison as future-proofing
for when the underlying issue in jenkins-core#2736 is fixed in
order to ensure that the test remains valid)
  • Loading branch information...
stephenc committed Jun 14, 2017
1 parent 28c5c3f commit 5f3fe479dd36e24ac4202eb2ffa2e66ddc256e0c
Showing with 20 additions and 4 deletions.
  1. +20 −4 src/test/java/jenkins/scm/impl/SingleSCMSourceTest.java
@@ -73,11 +73,27 @@ public void configRoundtrip() throws Exception {
MockSCMController c = MockSCMController.create();
try {
c.createRepository("foo");
SingleSCMSource source =
new SingleSCMSource("the-id", "the-name", new MockSCM(c, "foo",
new MockSCMHead("master"), null));
SingleSCMSource source = new SingleSCMSource(
"the-id",
"the-name",
new MockSCM(
c,
"foo",
new MockSCMHead("master"),
null
)
);
SCMSourceBuilder builder = new SCMSourceBuilder(source);
r.assertEqualDataBoundBeans(builder, r.configRoundtrip(builder));
r.assertEqualDataBoundBeans(new SCMSourceBuilder(new SingleSCMSource(
"the-id",
"the-name",
new MockSCM(
c,
"foo",
new MockSCMHead("master"),
null
)
)), r.configRoundtrip(builder));
} finally {
c.close();
}

0 comments on commit 5f3fe47

Please sign in to comment.
You can’t perform that action at this time.