Skip to content

Commit 016b716

Browse files
committed
Improve test speed
1 parent e2a8ff5 commit 016b716

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

ci/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ fi
1919

2020
# We always want coverage and race detection.
2121
argv+=(
22+
"-parallel=512"
2223
"-coverprofile=ci/out/coverage.prof"
2324
"-coverpkg=./..."
2425
)

websocket_test.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,8 +1768,8 @@ func TestAutobahn(t *testing.T) {
17681768
t.Parallel()
17691769

17701770
lengths := []int{
1771-
1 << 16, // 65536
1772-
1 << 18, // 262144
1771+
1 << 16,
1772+
1 << 18,
17731773
// Anything higher is completely unnecessary.
17741774
}
17751775

@@ -1791,7 +1791,6 @@ func TestAutobahn(t *testing.T) {
17911791
1 << 12,
17921792
1 << 14,
17931793
1 << 16,
1794-
1 << 18,
17951794
}
17961795

17971796
for _, l := range fragments {
@@ -1801,7 +1800,7 @@ func TestAutobahn(t *testing.T) {
18011800
if err != nil {
18021801
return err
18031802
}
1804-
b := randBytes(1 << 18)
1803+
b := randBytes(1 << 16)
18051804
for i := 0; i < len(b); {
18061805
j := i + fragmentLength
18071806
if j > len(b) {
@@ -1835,7 +1834,6 @@ func TestAutobahn(t *testing.T) {
18351834
lengths := []int{
18361835
0,
18371836
16,
1838-
64,
18391837
}
18401838

18411839
for _, l := range lengths {

0 commit comments

Comments
 (0)