MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / getChanges

Method getChanges

rest/revocation_test.go:136–148  ·  view source on GitHub ↗
(sinceSeq interface{}, expectedLength int)

Source from the content-addressed store, hash-verified

134}
135
136func (tester *ChannelRevocationTester) getChanges(sinceSeq interface{}, expectedLength int) ChangesResults {
137 var changes ChangesResults
138
139 // Ensure any previous mutations have caught up before issuing changes request
140 tester.restTester.WaitForPendingChanges()
141
142 err := tester.restTester.WaitForCondition(func() bool {
143 changes = tester.restTester.GetChanges(fmt.Sprintf("/{{.keyspace}}/_changes?since=%v&revocations=true", sinceSeq), "user")
144 return len(changes.Results) == expectedLength
145 })
146 require.NoError(tester.test, err, fmt.Sprintf("Unexpected: %d. Expected %d", len(changes.Results), expectedLength))
147 return changes
148}
149
150func InitScenario(t testing.TB, rtConfig *RestTesterConfig) (ChannelRevocationTester, *RestTester) {
151

Callers 15

TestRevocationScenario1Function · 0.80
TestRevocationScenario2Function · 0.80
TestRevocationScenario3Function · 0.80
TestRevocationScenario4Function · 0.80
TestRevocationScenario5Function · 0.80
TestRevocationScenario6Function · 0.80
TestRevocationScenario7Function · 0.80
TestRevocationScenario8Function · 0.80
TestRevocationScenario9Function · 0.80
TestRevocationScenario10Function · 0.80
TestRevocationScenario11Function · 0.80
TestRevocationScenario12Function · 0.80

Calls 3

WaitForConditionMethod · 0.80
GetChangesMethod · 0.65
WaitForPendingChangesMethod · 0.45

Tested by

no test coverage detected