A machine whose presence says online is heard now; last heard is otherwise the later of last_seen and the presence time (issue 1156)
This commit is contained in:
@@ -61,7 +61,7 @@ func TestAStuckKeyWrittenAndThenMovedRaisesAndClearsACondition(t *testing.T) { /
|
||||
t.Fatalf("a stuck key written: %+v %v", got, err)
|
||||
}
|
||||
machines := []machineFacts{{name: "ace", lastHeard: time.Now()}}
|
||||
if err := withPresence(ctx, js.Conn(), machines); err != nil {
|
||||
if err := withPresence(ctx, js.Conn(), machines, time.Now()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !machines[0].silent(time.Now()) {
|
||||
@@ -73,7 +73,7 @@ func TestAStuckKeyWrittenAndThenMovedRaisesAndClearsACondition(t *testing.T) { /
|
||||
t.Fatalf("a stuck key written as moved: %+v %v", got, err)
|
||||
}
|
||||
machines = []machineFacts{{name: "ace", lastHeard: time.Now().Add(-time.Hour), every: time.Minute}}
|
||||
if err := withPresence(ctx, js.Conn(), machines); err != nil {
|
||||
if err := withPresence(ctx, js.Conn(), machines, time.Now()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if machines[0].silent(time.Now()) {
|
||||
|
||||
Reference in New Issue
Block a user