Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9af12f8
Update development version to 4.1.1.BUILD-SNAPSHOT
fmbenhassine Oct 30, 2018
50d141d
Add assertion that a serializer was set in the JdbcExecutionContextDao
fmbenhassine Dec 11, 2018
481ad0e
Fix javadoc typo in PartitionStepBuilder#gridSize()
dimitrisli Nov 5, 2018
96e6ae2
Fix typo
fmbenhassine Nov 2, 2018
6dc22a7
Upgrade dependencies for version 4.1.1.RELEASE
fmbenhassine Jan 10, 2019
81552b3
Upgrade Spring Amqp and Integration versions
fmbenhassine Jan 11, 2019
a6d8ac1
Tweak XmlInputFactory settings
fmbenhassine Jan 11, 2019
cc63901
[artifactory-release] Release version 4.1.1.RELEASE
spring-builds Jan 11, 2019
d3ee8ed
[artifactory-release] Next development version
spring-builds Jan 11, 2019
7ea6656
Upgrade dependencies
fmbenhassine Jan 28, 2019
319c67c
Fix tests failing on windows
fmbenhassine Jan 18, 2019
72aaf9c
Minor polish
fmbenhassine Jan 25, 2019
ce82fc5
Fix JobOperatorFunctionalTests#testMultipleSimultaneousInstances
fmbenhassine Jan 15, 2019
eed1bd5
Fix tests failing randomly
fmbenhassine Jan 25, 2019
7803c1b
Fix integration tests
fmbenhassine Jan 30, 2019
008d081
Re-initialize datasource before each integration test
fmbenhassine Jan 30, 2019
bd4f442
Fix concurrency issue in RetryTransactionalPollingIntegrationTests
fmbenhassine Feb 1, 2019
79725d1
Treat MariaDB as MySQL
quaff Jan 31, 2019
9305808
URL Cleanup
spring-operator Mar 16, 2019
e673281
URL Cleanup
spring-operator Mar 21, 2019
d1d37bb
URL Cleanup
spring-operator Mar 26, 2019
167067b
URL Cleanup
spring-operator Mar 26, 2019
e28bcaa
Fix schema location of jsr 352 namespace
fmbenhassine Mar 26, 2019
9e31c42
Bump SF version to 5.1.6.BUILD-SNAPSHOT
fmbenhassine Mar 27, 2019
bf06ca5
Fix typo in log message
saikatbhadra Jan 29, 2019
7064f6b
Fix import in BeanValidatingItemProcessor
fmbenhassine Apr 2, 2019
6756495
Add new line in gradle.properties
fmbenhassine Apr 3, 2019
2590276
Update dependencies
fmbenhassine Apr 3, 2019
1e714b3
[artifactory-release] Release version 4.1.2.RELEASE
spring-builds Apr 3, 2019
c8a74b4
[artifactory-release] Next development version
spring-builds Apr 3, 2019
4fdd5f4
Mark the parameter of LineTokenizer#tokenize as `@Nullable`
fmbenhassine May 9, 2019
488cdaf
Update Spring projects dependencies to latest BUILD-SNAPSHOT
fmbenhassine Jun 14, 2019
dd6c0ea
add type safe getters to execution context
IlyaNerd Jun 25, 2019
4511c6e
sync
IlyaNerd Nov 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor polish
(cherry picked from commit c9f72cd)
  • Loading branch information
fmbenhassine committed Jan 28, 2019
commit 72aaf9c487f6dacd30069690796834e2682bf94c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private void initializeTasklet() {
tasklet = new SystemCommandTasklet();
tasklet.setEnvironmentParams(null); // inherit from parent process
tasklet.setWorkingDirectory(null); // inherit from parent process
tasklet.setSystemProcessExitCodeMapper(new TestExitCodeMapper());
tasklet.setSystemProcessExitCodeMapper(new SimpleSystemProcessExitCodeMapper());
tasklet.setTimeout(5000); // long enough timeout
tasklet.setTerminationCheckInterval(500);
tasklet.setCommand("invalid command, change value for successful execution");
Expand Down Expand Up @@ -136,7 +136,7 @@ public void testExecuteException() throws Exception {
*/
@Test
public void testExecuteTimeout() throws Exception {
String command = System.getProperty("os.name").toLowerCase().contains("win") ?
String command = isRunningOnWindows() ?
"ping 127.0.0.1" :
"sleep 3";
tasklet.setCommand(command);
Expand All @@ -158,7 +158,7 @@ public void testExecuteTimeout() throws Exception {
*/
@Test
public void testInterruption() throws Exception {
String command = System.getProperty("os.name").toLowerCase().contains("win") ?
String command = isRunningOnWindows() ?
"ping 127.0.0.1" :
"sleep 5";
tasklet.setCommand(command);
Expand Down Expand Up @@ -269,7 +269,7 @@ public void testStopped() throws Exception {

when(jobExplorer.getJobExecution(1L)).thenReturn(stepExecution.getJobExecution(), stepExecution.getJobExecution(), stoppedJobExecution);

String command = System.getProperty("os.name").toLowerCase().contains("win") ?
String command = isRunningOnWindows() ?
"ping 127.0.0.1 -n 5" :
"sleep 15";
tasklet.setCommand(command);
Expand All @@ -281,7 +281,7 @@ public void testStopped() throws Exception {
ChunkContext chunkContext = new ChunkContext(stepContext);
tasklet.execute(contribution, chunkContext);

assertEquals(contribution.getExitStatus().getExitCode(),ExitStatus.STOPPED.getExitCode());
assertEquals(ExitStatus.STOPPED.getExitCode(), contribution.getExitStatus().getExitCode());
}

private String getJavaCommand() {
Expand All @@ -294,29 +294,15 @@ private String getJavaCommand() {
command.append(fileSeparator);
command.append("java");

if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0) {
if(isRunningOnWindows()) {
command.append(".exe");
}

return command.toString();
}

/**
* Exit code mapper containing mapping logic expected by the tests. 0 means
* finished successfully, other value means failure.
*/
private static class TestExitCodeMapper implements SystemProcessExitCodeMapper {

@Override
public ExitStatus getExitStatus(int exitCode) {
if (exitCode == 0) {
return ExitStatus.COMPLETED;
}
else {
return ExitStatus.FAILED;
}
}

private boolean isRunningOnWindows() {
return System.getProperty("os.name").toLowerCase().contains("win");
}

}