mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-13 11:22:04 +00:00
fix(multiplayer): complete live results atomically
This commit is contained in:
@@ -36,6 +36,17 @@ func TestResultStoreBindsWorkloadAndMakesIdenticalDuplicateInert(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestResultStoreRejectsMissingAuthoritativeTime(t *testing.T) {
|
||||
binding := testBinding()
|
||||
store, err := NewResultStore(binding)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, _, err := store.Submit("result-1", testResult(), binding, time.Time{}); !errors.Is(err, ErrResultInvalid) {
|
||||
t.Fatalf("zero-time result error = %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestConflictingResultIsInertAndIntegritySuppressesRating(t *testing.T) {
|
||||
now := time.Unix(1000, 0)
|
||||
binding := testBinding()
|
||||
|
||||
Reference in New Issue
Block a user