update synctest.run to synctest.test

This commit is contained in:
henrygd
2025-08-25 21:25:19 -04:00
parent 0b0e94e045
commit 36f1a0c53b
3 changed files with 6 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ import (
)
func TestSessionCache_GetSet(t *testing.T) {
synctest.Run(func() {
synctest.Test(t, func(t *testing.T) {
cache := NewSessionCache(69 * time.Second)
testData := &system.CombinedData{

View File

@@ -39,7 +39,7 @@ func TestHealth(t *testing.T) {
// This test uses synctest to simulate time passing.
// NOTE: This test requires GOEXPERIMENT=synctest to run.
t.Run("check with simulated time", func(t *testing.T) {
synctest.Run(func() {
synctest.Test(t, func(t *testing.T) {
// Update the file to set the initial timestamp.
require.NoError(t, Update(), "Update() failed inside synctest")