-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* no default value for spike filter warp properties * minor query tweaks for better usability * DB tag name query should use Option --------- Co-authored-by: tomas mccandless <[email protected]>
- Loading branch information
Showing
9 changed files
with
58 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
warp-core/src/test/scala/com/workday/warp/arbiters/ArbiterLikeSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.workday.warp.arbiters | ||
|
||
import com.workday.warp.TestId | ||
import com.workday.warp.junit.{UnitTest, WarpJUnitSpec} | ||
import com.workday.warp.persistence.Tables._ | ||
import com.workday.warp.persistence.Tables.RowTypeClasses._ | ||
import com.workday.warp.persistence.TablesLike._ | ||
|
||
import java.time.Instant | ||
import java.util.UUID | ||
|
||
class ArbiterLikeSpec extends WarpJUnitSpec with ArbiterLike { | ||
|
||
@UnitTest | ||
def readSpikeFilterSettings(): Unit = { | ||
val methodSignature = s"com.workday.warp.arbiters.${UUID.randomUUID.toString}" | ||
val testId = TestId.fromString(methodSignature) | ||
val testExec: TestExecutionRowLike = this.persistenceUtils.createTestExecution(testId, Instant.now(), 5.0, 6.0) | ||
|
||
val settingsRow = SpikeFilterSettingsRow(testExec.idTestDefinition, false, 10, 10) | ||
this.persistenceUtils.writeSpikeFilterSettings(Seq(settingsRow)) | ||
|
||
this.spikeFilterSettings(testExec.idTestDefinition) should be (settingsRow.spikeFilterEnabled, settingsRow.alertOnNth) | ||
} | ||
|
||
/** | ||
* Checks that the measured test passed its performance requirement. If the requirement is failed, constructs an | ||
* error with a useful message wrapped in an Option. | ||
* | ||
* @param ballot box used to register vote result. | ||
* @param testExecution [[TestExecutionRowLikeType]] we are voting on. | ||
* @return a wrapped error with a useful message, or None if the measured test passed its requirement. | ||
*/ | ||
override def vote[T: TestExecutionRowLikeType](ballot: Ballot, testExecution: T): Option[Throwable] = None | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters