-
Notifications
You must be signed in to change notification settings - Fork 66
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
[JENKINS-54484] - Java 10 Support + clean + verify compatibility with old Program.Dat #77
Changes from all commits
3fcfc2e
38984f8
b10885c
bda50b2
bacb9d9
9c0d5f5
5c80fa9
e017dc5
be9a5ea
34609aa
f6d88d0
4420c05
be6f10c
43d37d4
d243824
8880828
96d1cab
3c1d020
5ca1045
f78b6d4
497275c
25d02b3
a3b23f9
60fc4b0
d625be1
415fb14
3efea44
1f65c25
b35e244
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.jenkinsci.plugins.workflow.support.pickles.serialization; | ||
|
||
import jenkins.model.Jenkins; | ||
import org.jenkinsci.plugins.workflow.job.WorkflowJob; | ||
import org.jenkinsci.plugins.workflow.job.WorkflowRun; | ||
import org.jenkinsci.plugins.workflow.support.steps.input.InputAction; | ||
import org.jenkinsci.plugins.workflow.support.steps.input.InputStepExecution; | ||
import org.junit.Assert; | ||
import org.junit.ClassRule; | ||
import org.junit.Ignore; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.jvnet.hudson.test.BuildWatcher; | ||
import org.jvnet.hudson.test.JenkinsRule; | ||
import org.jvnet.hudson.test.recipes.LocalData; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Tests deserializing program.dat, useful to catch | ||
*/ | ||
public class DeserializeUpdate { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense to upstream the test to the master branch. It is helpful independently of whether we merge it or not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't generally upstream failing tests There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But it should be passing on Java 8, no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @oleg-nenashev No, because the actual code binary format is different, on Java 8 as well -- it's the bump to the marshaller that does it, not the specific java version in use. |
||
@ClassRule | ||
public static BuildWatcher buildWatcher = new BuildWatcher(); | ||
@Rule | ||
public JenkinsRule r = new JenkinsRule(); | ||
|
||
private static InputStepExecution getInputStepExecution(WorkflowRun run, String inputMessage) throws Exception { | ||
InputAction ia = run.getAction(InputAction.class); | ||
List<InputStepExecution> execList = ia.getExecutions(); | ||
return execList.stream().filter(e -> inputMessage.equals(e.getInput().getMessage())).findFirst().orElse(null); | ||
} | ||
|
||
@Test | ||
@LocalData | ||
@Ignore | ||
public void testBasicSerializeDeserialize() throws Exception { | ||
WorkflowJob job = Jenkins.getInstance().getItemByFullName("serial-format", WorkflowJob.class); | ||
WorkflowRun run = job.getLastBuild(); | ||
Assert.assertTrue(run.isBuilding()); | ||
InputStepExecution ise = getInputStepExecution(run, "give me cheese"); | ||
ise.doProceedEmpty(); | ||
r.waitForCompletion(run); | ||
r.assertBuildStatusSuccess(run); | ||
} | ||
} |
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.
Should not be here. Defined in the parent POM.