Skip to content

Commit 90a9987

Browse files
committed
fix more tests
1 parent 0a43e32 commit 90a9987

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

enterprise/coderd/workspaceproxy_test.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"net/http/httptest"
88
"net/http/httputil"
99
"net/url"
10+
"runtime"
1011
"testing"
1112
"time"
1213

@@ -168,10 +169,16 @@ func TestRegions(t *testing.T) {
168169
require.Equal(t, proxy.Url, regions[1].PathAppURL)
169170
require.Equal(t, proxy.WildcardHostname, regions[1].WildcardHostname)
170171

172+
waitTime := testutil.WaitShort / 10
173+
// windows needs more time
174+
if runtime.GOOS == "windows" {
175+
waitTime = testutil.WaitShort / 5
176+
}
177+
171178
// Unfortunately need to wait to assert createdAt/updatedAt
172-
<-time.After(testutil.WaitShort / 10)
173-
require.WithinDuration(t, approxCreateTime, proxy.CreatedAt, testutil.WaitShort/10)
174-
require.WithinDuration(t, approxCreateTime, proxy.UpdatedAt, testutil.WaitShort/10)
179+
<-time.After(waitTime)
180+
require.WithinDuration(t, approxCreateTime, proxy.CreatedAt, waitTime)
181+
require.WithinDuration(t, approxCreateTime, proxy.UpdatedAt, waitTime)
175182
})
176183

177184
t.Run("RequireAuth", func(t *testing.T) {

enterprise/coderd/workspacequota_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"encoding/json"
77
"fmt"
88
"net/http"
9+
"runtime"
910
"sync"
1011
"testing"
1112
"time"
@@ -565,6 +566,10 @@ func TestWorkspaceSerialization(t *testing.T) {
565566
})
566567

567568
t.Run("ActivityBump", func(t *testing.T) {
569+
if runtime.GOOS == "windows" {
570+
t.Skip("Even though this test is expected to 'likely always fail', it doesn't fail on Windows")
571+
}
572+
568573
t.Log("Expected to fail. As long as quota & deadline are on the same " +
569574
" table and affect the same row, this will likely always fail.")
570575
// +---------------------+----------------------------------+

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy