Fix Flaky Sync Committee Test (#9337)

* fix flake

* Update beacon-chain/core/altair/sync_committee_test.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
This commit is contained in:
Nishant Das 2021-08-09 22:49:13 +08:00 committed by GitHub
parent be85b7f909
commit 170e2e115b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -337,10 +337,10 @@ func Test_ValidateSyncMessageTime(t *testing.T) {
wantedErr: "", wantedErr: "",
}, },
{ {
name: "sync_message.slot == current_slot+CLOCK_DISPARITY+200ms", name: "sync_message.slot == current_slot+CLOCK_DISPARITY-1000ms",
args: args{ args: args{
syncMessageSlot: 100, syncMessageSlot: 100,
genesisTime: timeutils.Now().Add(-(100*time.Duration(params.BeaconConfig().SecondsPerSlot)*time.Second - params.BeaconNetworkConfig().MaximumGossipClockDisparity - 200*time.Millisecond)), genesisTime: timeutils.Now().Add(-(100 * time.Duration(params.BeaconConfig().SecondsPerSlot) * time.Second) + params.BeaconNetworkConfig().MaximumGossipClockDisparity + 1000*time.Millisecond),
}, },
wantedErr: "sync message slot 100 not within allowable range of", wantedErr: "sync message slot 100 not within allowable range of",
}, },