Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit d5d8164

Browse files
author
Nikhil Bhoski
committed
Fixed test failure
1 parent cb001d8 commit d5d8164

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

src/test/java/com/mathworks/ci/RunMatlabCommandStepTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ public void verifyPipelineOnSlave() throws Exception {
7373

7474
s.getWorkspaceFor(project);
7575
WorkflowRun build = project.scheduleBuild2(0).get();
76-
j.assertLogContains("tester_started", build);
76+
77+
j.assertBuildStatusSuccess(build);
7778
}
7879

7980
/*
@@ -82,13 +83,11 @@ public void verifyPipelineOnSlave() throws Exception {
8283
*/
8384

8485
@Test
85-
public void verifyCommandSamAsScript() throws Exception {
86-
DumbSlave s = j.createOnlineSlave();
86+
public void verifyCommandSameAsScript() throws Exception {
8787
project.setDefinition(
8888
new CpsFlowDefinition("node { writeFile text: 'worksapce', file: 'test.txt'\n"
8989
+ "runMATLABCommand(matlabCommand: 'pwd')}", true));
9090

91-
s.getWorkspaceFor(project);
9291
WorkflowRun build = project.scheduleBuild2(0).get();
9392
j.assertLogContains("pwd", build);
9493
}

src/test/java/com/mathworks/ci/RunMatlabTestsStepTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void verifyOnslave() throws Exception {
6363
"node('!master') {testMATLABTests(testResultsPdf:'myresult/result.pdf')}", true));
6464
s.getWorkspaceFor(project);
6565
WorkflowRun build = project.scheduleBuild2(0).get();
66-
j.assertLogContains("tester_started", build);
66+
j.assertBuildStatusSuccess(build);
6767
}
6868

6969
/*

src/test/resources/run_matlab_command_test.bat

100644100755
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
rem Copyright 2020 The MathWorks, Inc.
22

3-
echo off
3+
echo "tester_started"
44

55
set "arg1=%~1"
66

7-
87
echo "%arg1%"

src/test/resources/run_matlab_command_test.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)