Changing the drain monitor to match the rest of the monitors using timer and ticker. Made a generic schedule status monitor that can be used with any of the default sets provided. (#49)
This commit is contained in:
parent
8d445c1c77
commit
1c426dd363
2 changed files with 57 additions and 48 deletions
|
@ -94,6 +94,11 @@ func TestRealisClient_CreateJob_Thermos(t *testing.T) {
|
|||
assert.Equal(t, aurora.ResponseCode_OK, resp.ResponseCode)
|
||||
fmt.Printf("Create call took %d ns\n", (end.UnixNano() - start.UnixNano()))
|
||||
|
||||
// Test Instances Monitor
|
||||
success, err := monitor.Instances(job.JobKey(), job.GetInstanceCount(), 1, 50)
|
||||
assert.True(t, success)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Tasks must exist for it to be killed
|
||||
t.Run("TestRealisClient_KillJob_Thermos", func(t *testing.T) {
|
||||
start := time.Now()
|
||||
|
@ -166,8 +171,8 @@ func TestRealisClient_DrainHosts(t *testing.T) {
|
|||
hostResults, err := monitor.HostMaintenance(
|
||||
hosts,
|
||||
[]aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED, aurora.MaintenanceMode_DRAINING},
|
||||
5,
|
||||
10)
|
||||
1,
|
||||
50)
|
||||
assert.Equal(t, map[string]bool{"192.168.33.7": true}, hostResults)
|
||||
assert.NoError(t, err)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue