Skip to content

Commit

Permalink
discard count should be greater than maximum discarded.
Browse files Browse the repository at this point in the history
  • Loading branch information
zainab-ali committed Nov 8, 2024
1 parent b7cc525 commit ac801c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ trait Checkers {
def shouldStop(config: CheckConfig) =
failure.isDefined ||
succeeded >= config.minimumSuccessful ||
discarded >= config.maximumDiscarded
discarded > config.maximumDiscarded

def shouldContinue(config: CheckConfig) = !shouldStop(config)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ object PropertyDogFoodTest extends IOSuite {

test("Config can be overridden") { dogfood =>
expectErrorMessage(
s"Discarded more inputs (${Meta.ConfigOverrideChecks.configOverride.maximumDiscarded}) than allowed",
s"Discarded more inputs (${Meta.ConfigOverrideChecks.configOverride.maximumDiscarded + 1}) than allowed",
dogfood.runSuite(Meta.ConfigOverrideChecks))
}

test("Discarded counts should be accurate") { dogfood =>
expectErrorMessage(
s"Discarded more inputs (${Meta.DiscardedChecks.checkConfig.maximumDiscarded}) than allowed",
s"Discarded more inputs (${Meta.DiscardedChecks.checkConfig.maximumDiscarded + 1}) than allowed",
dogfood.runSuite(Meta.DiscardedChecks))
}
test("Discard ratio of zero should still run tests") {
Expand Down Expand Up @@ -184,7 +184,7 @@ object Meta {

override def checkConfig =
super.checkConfig
.withMinimumSuccessful(1)
.withMinimumSuccessful(5)
// Set the discard ratio to 0. No discarded tests are permitted.
.withMaximumDiscardRatio(0)
.withPerPropertyParallelism(
Expand Down

0 comments on commit ac801c6

Please sign in to comment.