File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -663,8 +663,16 @@ func TestTemplateMetrics(t *testing.T) {
663
663
template , err = client .Template (ctx , template .ID )
664
664
require .NoError (t , err )
665
665
require .Equal (t , 1 , template .ActiveUserCount )
666
- require .NotNil (t , template .BuildTimeStats .StartMillis , template .BuildTimeStats )
667
- require .Greater (t , * template .BuildTimeStats .StartMillis , int64 (1 ))
666
+
667
+ require .Eventuallyf (t , func () bool {
668
+ template , err = client .Template (ctx , template .ID )
669
+ require .NoError (t , err )
670
+ startMs := template .BuildTimeStats .StartMillis
671
+ return startMs != nil && * startMs > 1
672
+ },
673
+ testutil .WaitShort , testutil .IntervalFast ,
674
+ "BuildTimeStats never loaded" ,
675
+ )
668
676
669
677
workspaces , err = client .Workspaces (ctx , codersdk.WorkspaceFilter {})
670
678
require .NoError (t , err )
You can’t perform that action at this time.
0 commit comments