refac: missing mutation tests, spa specs, checks shown to pass, touch targets, catalogue entry, production code
This commit is contained in:
1 parent
7c15206170
commit
3e02e14da4
48 files changed
+2173
-83
No files matched your search
+20
-1
@@ -1,9 +1,16 @@
|
||||
package test
|
||||
|
||||
import "errors"
|
||||
import (
|
||||
"errors"
|
||||
"sync"
|
||||
)
|
||||
|
||||
var errRepositoryFailure = errors.New("repository failure")
|
||||
|
||||
var errRunawayLocking = errors.New("the use case kept locking sites without settling")
|
||||
|
||||
const runawayLockCalls = 1000
|
||||
|
||||
type failSwitch struct {
|
||||
method string
|
||||
err error
|
||||
@@ -33,3 +40,15 @@ func (f *failSwitch) trigger(method string) error {
|
||||
}
|
||||
|
||||
const migrationPublicURL = "https://www.example.com"
|
||||
|
||||
func outsideLock(mu *sync.Mutex, hook func()) {
|
||||
mu.Unlock()
|
||||
defer mu.Lock()
|
||||
hook()
|
||||
}
|
||||
|
||||
func outsideLockErr(mu *sync.Mutex, hook func() error) error {
|
||||
mu.Unlock()
|
||||
defer mu.Lock()
|
||||
return hook()
|
||||
}
|
||||
Reference in new issue
Block a user