Skip to content

Commit 6a024bf

Browse files
committed
timeout
1 parent a82573d commit 6a024bf

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

core/src/main/kotlin/org/evomaster/core/output/service/RestTestCaseWriter.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ class RestTestCaseWriter : HttpWsTestCaseWriter {
289289
if (bodyParam != null) {
290290
lines.append(", data=body")
291291
}
292+
if(config.testTimeout > 0) {
293+
lines.append(", timeout=${config.testTimeout}")
294+
}
292295
}
293296
}
294297

core/src/main/kotlin/org/evomaster/core/output/service/TestCaseWriter.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,12 @@ abstract class TestCaseWriter {
344344
lines.indented {
345345
lines.add("raise e")
346346
}
347+
if (config.testTimeout > 0) {
348+
lines.add("except TimeoutError as e:")
349+
lines.indented {
350+
lines.add("unittest.skip(\"Test skipped due to timeout\")")
351+
}
352+
}
347353
}
348354

349355
when {

0 commit comments

Comments
 (0)