MCPcopy
hub / github.com/rqlite/rqlite / SetFailRate

Method SetFailRate

cdc/cdctest/server.go:91–100  ·  view source on GitHub ↗

SetFailRate sets the percentage of requests that should fail (0-100).

(rate int)

Source from the content-addressed store, hash-verified

89
90// SetFailRate sets the percentage of requests that should fail (0-100).
91func (h *HTTPTestServer) SetFailRate(rate int) {
92 h.mu.Lock()
93 defer h.mu.Unlock()
94 if rate < 0 {
95 rate = 0
96 } else if rate > 100 {
97 rate = 100
98 }
99 h.failRate = rate
100}
101
102// GetRequests returns a copy of the requests received by the server.
103func (h *HTTPTestServer) GetRequests() [][]byte {

Callers 3

Test_CDC_SingleNodeFunction · 0.95
Test_CDC_MultiNodeFunction · 0.95

Calls

no outgoing calls

Tested by 3

Test_CDC_SingleNodeFunction · 0.76
Test_CDC_MultiNodeFunction · 0.76