mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Add DeclineOffer return value to mock driver in mesos scheduler test
Depending on timing the mesos scheduler might call DeclineOffer: The default ttl of an offer in mesos scheduler is 5sec. If the tests run longer, the old, unused offers are declined, leading to an mock error. Probably fixes GoogleCloudPlatform/kubernetes#10795
This commit is contained in:
parent
05cf9043b5
commit
bf44f5df28
@ -440,6 +440,8 @@ func TestPlugin_LifeCycle(t *testing.T) {
|
||||
}
|
||||
mockDriver.On("LaunchTasks", mAny("[]*mesosproto.OfferID"), mAny("[]*mesosproto.TaskInfo"), mAny("*mesosproto.Filters")).
|
||||
Return(mesos.Status_DRIVER_RUNNING, nil).Run(launchTasksCalledFunc)
|
||||
mockDriver.On("DeclineOffer", mAny("*mesosproto.OfferID"), mAny("*mesosproto.Filters")).
|
||||
Return(mesos.Status_DRIVER_RUNNING, nil)
|
||||
|
||||
// elect master with mock driver
|
||||
driverFactory := ha.DriverFactory(func() (bindings.SchedulerDriver, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user