aboutsummaryrefslogtreecommitdiff
path: root/fs_test.go
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2022-01-10 12:15:30 +0800
committerGravatar GitHub <noreply@github.com> 2022-01-10 05:15:30 +0100
commit7eeb00e1ccc54b29a6a165c6a27d5dfa96b416ca (patch)
treeffbefcc9829273badfc97c86d22b49f7ed57ffed /fs_test.go
parentUpdate tcpdialer.go (#1188) (diff)
downloadfasthttp-7eeb00e1ccc54b29a6a165c6a27d5dfa96b416ca.tar.gz
fasthttp-7eeb00e1ccc54b29a6a165c6a27d5dfa96b416ca.tar.bz2
fasthttp-7eeb00e1ccc54b29a6a165c6a27d5dfa96b416ca.zip
Make tests less flaky (#1189)v1.32.0
Diffstat (limited to 'fs_test.go')
-rw-r--r--fs_test.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/fs_test.go b/fs_test.go
index 5c39cb1..51a7e2a 100644
--- a/fs_test.go
+++ b/fs_test.go
@@ -483,6 +483,11 @@ func testParseByteRangeError(t *testing.T, v string, contentLength int) {
}
func TestFSCompressConcurrent(t *testing.T) {
+ // Don't run this test on Windows, the Windows Github actions are to slow and timeout too often.
+ if runtime.GOOS == "windows" {
+ t.SkipNow()
+ }
+
// This test can't run parallel as files in / might be changed by other tests.
stop := make(chan struct{})
@@ -513,7 +518,7 @@ func TestFSCompressConcurrent(t *testing.T) {
for i := 0; i < concurrency; i++ {
select {
case <-ch:
- case <-time.After(time.Second * 3):
+ case <-time.After(time.Second * 2):
t.Fatalf("timeout")
}
}
@@ -540,6 +545,11 @@ func TestFSCompressSingleThread(t *testing.T) {
}
func testFSCompress(t *testing.T, h RequestHandler, filePath string) {
+ // File locking is flaky on Windows.
+ if runtime.GOOS == "windows" {
+ t.SkipNow()
+ }
+
var ctx RequestCtx
ctx.Init(&Request{}, nil, nil)