补充插件通信审查证据与覆盖记录
This commit is contained in:
1 parent
8e50cc6081
commit
9849f8f11c
30 files changed
+3899
No files matched your search
@@ -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()
|
||||
}
|
||||
Reference in new issue
Block a user