Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit58b65a1

Browse files
committed
try to fix potential race in test
1 parent0b002ec commit58b65a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎agent/agentcontainers/api_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ func TestAPI(t *testing.T) {
737737
ID:"container-id",
738738
FriendlyName:"container-name",
739739
Running:true,
740-
CreatedAt:time.Now(),
740+
CreatedAt:time.Now().Add(-1*time.Minute),
741741
Labels:map[string]string{
742742
agentcontainers.DevcontainerLocalFolderLabel:"/home/coder/project",
743743
agentcontainers.DevcontainerConfigFileLabel:"/home/coder/project/.devcontainer/devcontainer.json",
@@ -771,6 +771,8 @@ func TestAPI(t *testing.T) {
771771

772772
ctx:=testutil.Context(t,testutil.WaitShort)
773773

774+
clk.Set(time.Now()).MustWait(ctx)
775+
774776
// Simulate a file modification event to make the devcontainer dirty.
775777
watcher.sendEventWaitNextCalled(ctx, fsnotify.Event{
776778
Name:"/home/coder/project/.devcontainer/devcontainer.json",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp