File tree Expand file tree Collapse file tree
core-tests/e2e-tests/spring/spring-rest-openapi-v3/src/main/kotlin/com/foo/rest/examples/spring/openapi/v3/flakinessdetect
core/src/main/kotlin/org/evomaster/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.RequestParam
99import org.springframework.web.bind.annotation.RestController
1010import java.time.LocalDateTime
1111import java.time.format.DateTimeFormatter
12+ import java.util.UUID
1213import kotlin.math.abs
1314import kotlin.math.max
1415import kotlin.math.min
@@ -19,6 +20,18 @@ class FlakinessDetectRest {
1920
2021 companion object {
2122 val formatter = DateTimeFormatter .ofPattern(" HH:mm:ss.SSS yyyy-MM-dd EEEE 'Week' ww" )
23+ private val START_UP_OBJECT_TAG = arrayOf(javax.validation.constraints.Pattern .Flag .CASE_INSENSITIVE ).toString()
24+ }
25+ @GetMapping(path = [" /objectFlag" ])
26+ fun getEmptyFlag () : ResponseEntity <String > {
27+
28+ return ResponseEntity .ok(START_UP_OBJECT_TAG )
29+ }
30+
31+ @GetMapping(path = [" /stringuuid" ])
32+ fun getStringuuid () : ResponseEntity <String >{
33+
34+ return ResponseEntity .ok( UUID .randomUUID().toString())
2235 }
2336
2437 @GetMapping(path = [" /stringfirst/{n}" ])
@@ -89,3 +102,5 @@ data class TimeAgoData(
89102 val message : String ,
90103 val calculatedPastTime : String
91104)
105+
106+ class EmptyForFlag (val flag : String )
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ class FlakinessDetector<T: Individual> : TimeBoxedPhase {
119119 } else {
120120 val normO = derive(oBody)
121121 if (rBody != normO) {
122- resultToUpdate.setFlakyBody(oBody )
122+ resultToUpdate.setFlakyBody(normO )
123123 }
124124 }
125125 }
@@ -147,7 +147,7 @@ class FlakinessDetector<T: Individual> : TimeBoxedPhase {
147147 */
148148 val normO = derive(oMsg)
149149 if (rMsg != normO) {
150- resultToUpdate.setFlakyErrorMessage(oMsg )
150+ resultToUpdate.setFlakyErrorMessage(normO )
151151 }
152152 }
153153 }
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ object FlakinessInferenceUtil {
6666 /* *
6767 * Match JVM object toString like com.foo.Bar@1a2b3c.
6868 */
69- private val OBJECT_AT_REGEX = Regex (" [ A-Za-z0-9_.$]+@[0-9a-fA-F]+" )
69+ private val OBJECT_AT_REGEX = Regex (""" [\[ A-Za-z0-9_.$; ]+@[0-9a-fA-F]+"" " )
7070
7171 /* *
7272 * Match hex pointers like 0x1a2b3c.
You can’t perform that action at this time.
0 commit comments