Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.RestController
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
import java.util.UUID
import kotlin.math.abs
import kotlin.math.max
import kotlin.math.min
Expand All @@ -19,6 +20,18 @@ class FlakinessDetectRest {

companion object{
val formatter = DateTimeFormatter.ofPattern("HH:mm:ss.SSS yyyy-MM-dd EEEE 'Week' ww")
private val START_UP_OBJECT_TAG = arrayOf(javax.validation.constraints.Pattern.Flag.CASE_INSENSITIVE).toString()
}
@GetMapping(path = ["/objectFlag"])
open fun getEmptyFlag() : ResponseEntity<String> {

return ResponseEntity.ok(START_UP_OBJECT_TAG)
}

@GetMapping(path = ["/stringuuid"])
open fun getStringuuid() : ResponseEntity<String>{

return ResponseEntity.ok( UUID.randomUUID().toString())
}

@GetMapping(path = ["/stringfirst/{n}"])
Expand Down Expand Up @@ -88,4 +101,6 @@ data class FlakinessDetectData(
data class TimeAgoData(
val message: String,
val calculatedPastTime: String
)
)

class EmptyForFlag(val flag: String)
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class FlakinessDetector<T: Individual> {
} else {
val normO = derive(oBody)
if (rBody != normO) {
resultToUpdate.setFlakyBody(oBody)
resultToUpdate.setFlakyBody(normO)
}
}
}
Expand Down Expand Up @@ -132,7 +132,7 @@ class FlakinessDetector<T: Individual> {
*/
val normO = derive(oMsg)
if (rMsg != normO) {
resultToUpdate.setFlakyErrorMessage(oMsg)
resultToUpdate.setFlakyErrorMessage(normO)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ object FlakinessInferenceUtil {
/**
* Match JVM object toString like com.foo.Bar@1a2b3c.
*/
private val OBJECT_AT_REGEX = Regex("[A-Za-z0-9_.$]+@[0-9a-fA-F]+")
private val OBJECT_AT_REGEX = Regex("""[\[A-Za-z0-9_.$;]+@[0-9a-fA-F]+""")

/**
* Match hex pointers like 0x1a2b3c.
Expand Down
Loading