You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/core-providers/README.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,29 @@ This directory contains comprehensive tests for all Bifrost AI providers, ensuri
21
21
22
22
## 🏃♂️ Running Tests
23
23
24
+
### Parallel Test Execution
25
+
26
+
All provider tests are configured to run in parallel using Go's `t.Parallel()` function. This allows multiple provider tests to execute concurrently, significantly reducing total test execution time.
27
+
28
+
**Benefits:**
29
+
- Faster test execution when testing multiple providers
30
+
- Better resource utilization
31
+
- Isolated test execution (each test creates its own client instance)
32
+
33
+
**Usage:**
34
+
```bash
35
+
# Default: Tests run in parallel (up to GOMAXPROCS concurrent tests)
36
+
go test -v ./tests/core-providers/
37
+
38
+
# Explicitly set number of parallel tests
39
+
go test -v ./tests/core-providers/ -parallel 10
40
+
41
+
# Run tests sequentially (disable parallel execution)
42
+
go test -v ./tests/core-providers/ -parallel 1
43
+
```
44
+
45
+
**Note:** Each test function creates its own isolated Bifrost client instance via `config.SetupTest()`, ensuring no shared state between parallel test executions.
46
+
24
47
### Development with Local Bifrost Core
25
48
26
49
To test changes with a forked or local version of bifrost-core:
# Tests are configured to run in parallel by default
119
+
go test -v ./tests/core-providers/ -parallel 10
120
+
94
121
# Run with debug logs
95
122
go test -v ./tests/core-providers/ -debug
96
123
```
97
124
125
+
**Note**: All provider tests are configured to run in parallel using `t.Parallel()`. This means multiple provider tests can execute concurrently, significantly reducing total test execution time. The number of parallel tests can be controlled using the `-parallel` flag (default is the number of CPUs).
0 commit comments