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

Commit 0abb319

Browse files
committed
Remove sleep statements
1 parent 30e5eb0 commit 0abb319

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

src/test/java/com/mathworks/ci/systemTests/GlobalToolIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public void verifyAllToolsAreAvailable() throws Exception {
110110
HtmlPage configurePage = jenkins.createWebClient().goTo("job/test0/configure");
111111
HtmlCheckBoxInput matlabVer = configurePage.getElementByName("com-mathworks-ci-UseMatlabVersionBuildWrapper");
112112
matlabVer.setChecked(true);
113-
Thread.sleep(2000);
113+
114114
HtmlSelect matlabOptions = (HtmlSelect) configurePage.getByXPath("//select[contains(@class, \"dropdownList\")]").get(1);
115115
assertEquals(matlabOptions.getOption(0).getValueAttribute(),"MATLAB_PATH_1");
116116
assertEquals(matlabOptions.getOption(1).getValueAttribute(),"MATLAB_PATH_2");

src/test/java/com/mathworks/ci/systemTests/RunMATLABTestsArtifactsIT.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ public void verifyJUnitFilePathInput() throws Exception{
7979
HtmlPage page = jenkins.createWebClient().goTo("job/test0/configure");
8080
HtmlCheckBoxInput junitChkbx = page.getElementByName("junitArtifact");
8181
junitChkbx.setChecked(true);
82-
Thread.sleep(2000);
8382

8483
HtmlTextInput junitFilePathInput = (HtmlTextInput) page.getElementByName("_.junitReportFilePath");
8584
Assert.assertEquals(TestMessage.getValue("junit.file.path"),junitFilePathInput.getValueAttribute());
@@ -94,7 +93,6 @@ public void verifyTAPTestFilePathInput() throws Exception{
9493
HtmlPage page = jenkins.createWebClient().goTo("job/test0/configure");
9594
HtmlCheckBoxInput tapChkbx = page.getElementByName("tapArtifact");
9695
tapChkbx.setChecked(true);
97-
Thread.sleep(2000);
9896

9997
HtmlTextInput tapFilePathInput = (HtmlTextInput) page.getElementByName("_.tapReportFilePath");
10098
Assert.assertEquals(TestMessage.getValue("taptestresult.file.path"),tapFilePathInput.getValueAttribute());
@@ -110,7 +108,6 @@ public void verifyPDFReportFilePathInput() throws Exception{
110108
HtmlPage page = jenkins.createWebClient().goTo("job/test0/configure");
111109
HtmlCheckBoxInput pdfChkbx = page.getElementByName("pdfReportArtifact");
112110
pdfChkbx.setChecked(true);
113-
Thread.sleep(2000);
114111

115112
HtmlTextInput PDFFilePathInput=(HtmlTextInput) page.getElementByName("_.pdfReportFilePath");
116113
Assert.assertEquals(TestMessage.getValue("pdftestreport.file.path"),PDFFilePathInput.getValueAttribute());
@@ -125,7 +122,6 @@ public void verifyCoberturaFilePathInput() throws Exception {
125122
HtmlPage page = jenkins.createWebClient().goTo("job/test0/configure");
126123
HtmlCheckBoxInput coberturaChkBx = page.getElementByName("coberturaArtifact");
127124
coberturaChkBx.setChecked(true);
128-
Thread.sleep(2000);
129125

130126
HtmlTextInput coberturaCodeCoverageFileInput=(HtmlTextInput) page.getElementByName("_.coberturaReportFilePath");
131127
Assert.assertEquals(TestMessage.getValue("cobertura.file.path"),coberturaCodeCoverageFileInput.getValueAttribute());
@@ -141,7 +137,6 @@ public void verifyModelCoverageFilePathInput() throws Exception {
141137
HtmlPage page = jenkins.createWebClient().goTo("job/test0/configure");
142138
HtmlCheckBoxInput modelCoverageChkBx = page.getElementByName("modelCoverageArtifact");
143139
modelCoverageChkBx.setChecked(true);
144-
Thread.sleep(2000);
145140

146141
HtmlTextInput coberturaModelCoverageFileInput=(HtmlTextInput) page.getElementByName("_.modelCoverageFilePath");
147142
Assert.assertEquals(TestMessage.getValue("modelcoverage.file.path"),coberturaModelCoverageFileInput.getValueAttribute());
@@ -157,7 +152,6 @@ public void verifySTMResultsFilePathInput() throws Exception {
157152
HtmlPage page = jenkins.createWebClient().goTo("job/test0/configure");
158153
HtmlCheckBoxInput stmResultsChkBx = page.getElementByName("stmResultsArtifact");
159154
stmResultsChkBx.setChecked(true);
160-
Thread.sleep(2000);
161155

162156
HtmlTextInput STMRFilePathInput=(HtmlTextInput) page.getElementByName("_.stmResultsFilePath");
163157
Assert.assertEquals(TestMessage.getValue("stmresults.file.path"),STMRFilePathInput.getValueAttribute());
@@ -208,7 +202,7 @@ public void verifyCustomFilenamesForArtifactsPipeline() throws Exception {
208202
" {\n" +
209203
" unzip '" + Utilities.getRunMATLABTestsData().getPath() + "'" + "\n" +
210204
" runMATLABTests(sourceFolder:['src'], testResultsTAP: 'test-results/results.tap',\n" +
211-
" testResultsPDF: 'test-results/results.pdf'\n" +
205+
" testResultsPDF: 'test-results/results.pdf',\n" +
212206
" testResultsJUnit: 'test-results/results.xml',\n" +
213207
" testResultsSimulinkTest: 'test-results/results.mldatx',\n" +
214208
" codeCoverageCobertura: 'code-coverage/coverage.xml',\n" +

src/test/java/com/mathworks/ci/systemTests/RunMATLABTestsIT.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ public void verifySourceFolderDefaultState() throws Exception {
115115
HtmlPage page = jenkins.createWebClient().goTo("job/test0/configure");
116116
HtmlCheckBoxInput sourceFolder = page.getElementByName("_.sourceFolder");
117117
sourceFolder.click();
118+
118119
WebAssert.assertElementPresentByXPath(page, "//input[@name=\"_.srcFolderPath\"]");
119120
HtmlInput srcFolderPath = page.getElementByName("_.srcFolderPath");
120121
assertEquals("", srcFolderPath.getTextContent());
@@ -126,7 +127,7 @@ public void verifySelectByFolderDefaultState() throws Exception {
126127
HtmlPage page = jenkins.createWebClient().goTo("job/test0/configure");
127128
HtmlCheckBoxInput sourceFolder = page.getElementByName("_.selectByFolder");
128129
sourceFolder.click();
129-
Thread.sleep(2000);
130+
130131
WebAssert.assertElementPresentByXPath(page, "//input[@name=\"_.testFolders\"]");
131132
HtmlInput srcFolderPath = page.getElementByName("_.testFolders");
132133
assertEquals("", srcFolderPath.getTextContent());
@@ -138,7 +139,7 @@ public void verifySelectByTagDefaultState() throws Exception {
138139
HtmlPage page = jenkins.createWebClient().goTo("job/test0/configure");
139140
HtmlCheckBoxInput sourceFolder = page.getElementByName("_.selectByTag");
140141
sourceFolder.click();
141-
Thread.sleep(2000);
142+
142143
WebAssert.assertElementPresentByXPath(page, "//input[@name=\"_.testTag\"]");
143144
HtmlInput srcFolderPath = page.getElementByName("_.testTag");
144145
assertEquals("", srcFolderPath.getTextContent());

0 commit comments

Comments
 (0)