Mark runner as used now asynchronously.

This commit is contained in:
Maximilian Paß
2021-10-22 14:54:50 +02:00
parent 055fa43227
commit ba6e7035fa
3 changed files with 31 additions and 7 deletions

View File

@@ -11,6 +11,7 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"testing"
"time"
)
func TestConfigureNetworkCreatesNewNetworkWhenNoNetworkExists(t *testing.T) {
@@ -188,5 +189,6 @@ func TestTwoSampleAddExactlyTwoRunners(t *testing.T) {
_, ok = environment.Sample(apiMock)
require.True(t, ok)
<-time.After(tests.ShortTimeout) // New Runners are requested asynchronously
apiMock.AssertNumberOfCalls(t, "RegisterRunnerJob", 2)
}