Commit 0c8d0b52 authored by ggeorgiev_'s avatar ggeorgiev_

small fixes

parent 5f0ac8c7
......@@ -82,7 +82,7 @@ func TestRunnerMachinesCoordinator_SignalMachineAvailable(t *testing.T) {
go func() {
readyToReceiveSignal <- struct{}{}
time.Sleep(1 * time.Second)
time.Sleep(time.Second)
coordinator.addAvailableMachine()
}()
......
......@@ -163,24 +163,6 @@ func (m *machineProvider) findFreeMachine(skipCache bool, machines ...string) (d
return nil
}
func (m *machineProvider) prepareCreatedMachine(newMachineDetails *machineDetails, err error) (*machineDetails, error) {
m.lock.Lock()
if err == nil && newMachineDetails.canBeUsed() {
newMachineDetails.State = machineStateAcquired
m.lock.Unlock()
} else {
m.lock.Unlock()
newMachineDetails = nil
if err == nil {
// We're unlucky; the machine was snapped up by another job.
err = errors.New("unable to create new machine")
}
}
return newMachineDetails, err
}
func (m *machineProvider) findFreeExistingMachine(config *common.RunnerConfig) (*machineDetails, error) {
machines, err := m.loadMachines(config)
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment