Integration fixes

This commit is contained in:
Daniel Hiltgen 2024-05-10 14:13:26 -07:00
parent 86f9b582d5
commit 074dc3b9d8
2 changed files with 3 additions and 3 deletions

View file

@ -217,7 +217,7 @@ func TestMultiModelStress(t *testing.T) {
defer wg.Done() defer wg.Done()
for j := 0; j < 3; j++ { for j := 0; j < 3; j++ {
slog.Info("Starting", "req", i, "iter", j, "model", req[i].Model) slog.Info("Starting", "req", i, "iter", j, "model", req[i].Model)
DoGenerate(ctx, t, client, req[i], resp[i], 90*time.Second, 5*time.Second) DoGenerate(ctx, t, client, req[i], resp[i], 120*time.Second, 5*time.Second)
} }
}(i) }(i)
} }

View file

@ -85,7 +85,7 @@ func GetTestEndpoint() (*api.Client, string) {
var serverMutex sync.Mutex var serverMutex sync.Mutex
var serverReady bool var serverReady bool
func startServer(ctx context.Context, ollamaHost string) error { func startServer(t *testing.T, ctx context.Context, ollamaHost string) error {
// Make sure the server has been built // Make sure the server has been built
CLIName, err := filepath.Abs("../ollama") CLIName, err := filepath.Abs("../ollama")
if err != nil { if err != nil {
@ -200,7 +200,7 @@ func InitServerConnection(ctx context.Context, t *testing.T) (*api.Client, strin
} }
lifecycle.ServerLogFile = fp.Name() lifecycle.ServerLogFile = fp.Name()
fp.Close() fp.Close()
require.NoError(t, startServer(ctx, testEndpoint)) require.NoError(t, startServer(t, ctx, testEndpoint))
} }
return client, testEndpoint, func() { return client, testEndpoint, func() {