补充插件通信审查证据与覆盖记录

This commit is contained in:
xuans committed 2026-09-06 04:33:34 +08:00
1 parent 8e50cc6081
commit 9849f8f11c
30 files changed
+3899

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
package controllers
import (
"sync"
"testing"
)
// 并发模拟停止阶段清空安全服务与在途控制器获取服务;必须以 -race 运行。
func TestAuditWebAuthnRuntimePublication(t *testing.T) {
previous := webAuthnRuntime()
t.Cleanup(func() { ConfigureWebAuthnRuntime(previous) })
start := make(chan struct{})
var workers sync.WaitGroup
workers.Add(2)
go func() {
defer workers.Done()
<-start
for index := 0; index < 1000; index++ {
ConfigureWebAuthnRuntime(nil)
}
}()
go func() {
defer workers.Done()
<-start
for index := 0; index < 1000; index++ {
_ = webAuthnRuntime()
}
}()
close(start)
workers.Wait()
}