updates on the airegistry and controllers and test files are been integrated

This commit is contained in:
2026-09-30 16:38:34 +05:30
parent 0ac5d3d54f
commit cb3108ffdb
5 changed files with 127 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package controllers
import (
"testing"
"time"
)
// Without Redis (as in this test binary) the in-process stamp still works, so
// a single replica reports the engine's reads correctly.
func TestRegistryReadStampWithoutRedis(t *testing.T) {
lastRegistryRead.Store(0)
if registryLastRead() != nil {
t.Fatal("no read yet must report nil")
}
markRegistryRead()
got := registryLastRead()
if got == nil || time.Since(*got) > 5*time.Second {
t.Fatalf("stamp not recorded: %v", got)
}
}