Skip to content

Commit a0ef367

Browse files
authored
Merge pull request #1416 from crytic/flaky-tests
Reduce test flakiness
2 parents 943e89b + 26e7869 commit a0ef367

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
testMode: dapptest
2-
testLimit: 1000
2+
testLimit: 5000
33
shrinkLimit: 100
44
seqLen: 1

tests/solidity/values/now.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ contract C {
33
uint time;
44

55
function set() public {
6-
time = block.timestamp;
6+
if (time == 0)
7+
time = block.timestamp;
78
}
89

910
function guess(uint x) public {
10-
if (x <= time + 4 weeks && x >= time - 4 weeks )
11+
if (time > 0 && x <= time + 4 weeks && x >= time - 4 weeks )
1112
state = true;
1213
}
1314

0 commit comments

Comments
 (0)