Compare commits

...

1 commit

Author SHA1 Message Date
832e14bc38
f-83: watchdog: le test attend la fin de Run avant la fermeture de la base #83
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2026-10-24 14:18:55 +02:00

View file

@ -111,8 +111,15 @@ func TestRun_VerifieLesTroisTypesDeRessource(t *testing.T) {
w := New(db, testCfg(t), n, l, 10*time.Millisecond) w := New(db, testCfg(t), n, l, 10*time.Millisecond)
ctx, cancel := context.WithCancel(context.Background()) ctx, cancel := context.WithCancel(context.Background())
defer cancel() done := make(chan struct{})
go w.Run(ctx) go func() {
w.Run(ctx)
close(done)
}()
defer func() {
cancel()
<-done
}()
kinds := map[string]bool{} kinds := map[string]bool{}
deadline := time.After(5 * time.Second) deadline := time.After(5 * time.Second)