Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion backend/video-recombiner/internal/test/nats_fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package test
import (
"context"
"testing"
"time"

"github.com/nats-io/nats.go"
"github.com/nats-io/nats.go/jetstream"
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion backend/video-upload/cmd/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
2 changes: 1 addition & 1 deletion backend/video-upload/internal/handler/job_status_kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ func updateJobStatusKV(ctx context.Context, jobID string, kv jetstream.KeyValue,
}

return nil
}
}
8 changes: 7 additions & 1 deletion backend/video-upload/internal/test/nats_fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package test
import (
"context"
"testing"
"time"

"github.com/nats-io/nats.go"
"github.com/nats-io/nats.go/jetstream"
Expand All @@ -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)

Expand Down
Loading