diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7918069..30e969f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,6 +20,7 @@ jobs: transcoder_worker: ${{ steps.changes.outputs.transcoder_worker }} video_recombiner: ${{ steps.changes.outputs.video_recombiner }} video_upload: ${{ steps.changes.outputs.video_upload }} + video_status: ${{ steps.changes.outputs.video_status }} steps: - uses: actions/checkout@v4 - uses: dorny/paths-filter@v3 diff --git a/backend/video-recombiner/internal/test/nats_fixtures.go b/backend/video-recombiner/internal/test/nats_fixtures.go index eb4fa36..94ea9a3 100644 --- a/backend/video-recombiner/internal/test/nats_fixtures.go +++ b/backend/video-recombiner/internal/test/nats_fixtures.go @@ -5,6 +5,7 @@ package test import ( "context" "testing" + "time" "github.com/nats-io/nats.go" "github.com/nats-io/nats.go/jetstream" @@ -26,7 +27,11 @@ func SetupNats(t *testing.T) (jetstream.JetStream, *nats.Conn) { url, err := container.ConnectionString(ctx) require.NoError(t, err) - nc, err := nats.Connect(url) + nc, err := nats.Connect(url, + nats.RetryOnFailedConnect(true), + nats.MaxReconnects(10), + nats.ReconnectWait(200*time.Millisecond), + ) require.NoError(t, err) t.Cleanup(nc.Close) diff --git a/backend/video-upload/cmd/helpers_test.go b/backend/video-upload/cmd/helpers_test.go index aa93ff6..578cae9 100644 --- a/backend/video-upload/cmd/helpers_test.go +++ b/backend/video-upload/cmd/helpers_test.go @@ -44,4 +44,4 @@ func startTestServer(t *testing.T, kv jetstream.KeyValue) (*http.Server, *Config t.Cleanup(func() { server.Shutdown(context.Background()) }) //nolint:errcheck return server, cfg -} \ No newline at end of file +} diff --git a/backend/video-upload/internal/handler/job_status_kv.go b/backend/video-upload/internal/handler/job_status_kv.go index c9751a3..fceb601 100644 --- a/backend/video-upload/internal/handler/job_status_kv.go +++ b/backend/video-upload/internal/handler/job_status_kv.go @@ -43,4 +43,4 @@ func updateJobStatusKV(ctx context.Context, jobID string, kv jetstream.KeyValue, } return nil -} \ No newline at end of file +} diff --git a/backend/video-upload/internal/test/nats_fixtures.go b/backend/video-upload/internal/test/nats_fixtures.go index e29fedc..e006884 100644 --- a/backend/video-upload/internal/test/nats_fixtures.go +++ b/backend/video-upload/internal/test/nats_fixtures.go @@ -5,6 +5,7 @@ package test import ( "context" "testing" + "time" "github.com/nats-io/nats.go" "github.com/nats-io/nats.go/jetstream" @@ -26,7 +27,12 @@ func SetupNats(t *testing.T) (jetstream.JetStream, *nats.Conn) { url, err := container.ConnectionString(ctx) require.NoError(t, err) - nc, err := nats.Connect(url) + nc, err := nats.Connect(url, + nats.RetryOnFailedConnect(true), + nats.MaxReconnects(10), + nats.ReconnectWait(200*time.Millisecond), + ) + require.NoError(t, err) t.Cleanup(nc.Close)