Skip to content

Commit 346f5c3

Browse files
committed
address the comments
1 parent da02809 commit 346f5c3

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

core/src/main/kotlin/org/evomaster/core/problem/httpws/HttpWsCallResult.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ abstract class HttpWsCallResult : EnterpriseActionResult {
4646

4747
}
4848

49+
/**
50+
* this is used to record observed flakiness during flakiness handling
51+
*/
52+
private val flakyObservations: MutableList<FlakyObservation> = mutableListOf()
53+
54+
4955
/**
5056
* In some cases (eg infinite loop redirection), a HTTP call
5157
* might fail, and, as such, we might not have an actual "result"
@@ -269,7 +275,6 @@ abstract class HttpWsCallResult : EnterpriseActionResult {
269275
val valuesByExecIndex: Map<Int, String?>
270276
)
271277

272-
private val flakyObservations: MutableList<FlakyObservation> = mutableListOf()
273278

274279
/**
275280
* Compare [other] result with [this] original call result

core/src/main/kotlin/org/evomaster/core/search/service/FlakinessDetector.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ class FlakinessDetector<T: Individual> : TimeBoxedPhase {
3636
private lateinit var epc: ExecutionPhaseController
3737

3838
override fun applyPhase() {
39+
if (!config.handleFlakiness) {
40+
throw IllegalStateException("handleFlakiness must be enabled before applying this phase of flakiness detection and handing with FlakinessDetector")
41+
}
42+
3943
if (config.enableStaticFlakyInference) {
4044
inferStaticFlakiness()
4145
}

0 commit comments

Comments
 (0)