internal/libs: delete unused functionality (#7569)

This commit is contained in:
Sam Kleinman
2022-01-12 15:55:42 -05:00
committed by GitHub
parent e07c4cdcf2
commit 25e665df17
4 changed files with 0 additions and 75 deletions
-40
View File
@@ -1,40 +0,0 @@
package fail
import (
"fmt"
"os"
"strconv"
)
func envSet() int {
callIndexToFailS := os.Getenv("FAIL_TEST_INDEX")
if callIndexToFailS == "" {
return -1
}
var err error
callIndexToFail, err := strconv.Atoi(callIndexToFailS)
if err != nil {
return -1
}
return callIndexToFail
}
// Fail when FAIL_TEST_INDEX == callIndex
var callIndex int // indexes Fail calls
func Fail() {
callIndexToFail := envSet()
if callIndexToFail < 0 {
return
}
if callIndex == callIndexToFail {
fmt.Printf("*** fail-test %d ***\n", callIndex)
os.Exit(1)
}
callIndex++
}
-7
View File
@@ -55,13 +55,6 @@ func (t *ThrottleTimer) Set() {
}
}
func (t *ThrottleTimer) Unset() {
t.mtx.Lock()
defer t.mtx.Unlock()
t.isSet = false
t.timer.Stop()
}
// For ease of .Stop()'ing services before .Start()'ing them,
// we ignore .Stop()'s on nil ThrottleTimers
func (t *ThrottleTimer) Stop() bool {