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

Function getChanges

db/change_cache_test.go:2848–2859  ·  view source on GitHub ↗

getChanges is a synchronous convenience function that returns all changes as a simple array. This will fail the test if an error is returned.

(t *testing.T, collection *DatabaseCollectionWithUser, channels base.Set, options ChangesOptions)

Source from the content-addressed store, hash-verified

2846
2847// getChanges is a synchronous convenience function that returns all changes as a simple array. This will fail the test if an error is returned.
2848func getChanges(t *testing.T, collection *DatabaseCollectionWithUser, channels base.Set, options ChangesOptions) []*ChangeEntry {
2849 require.NotNil(t, options.ChangesCtx)
2850 feed, err := collection.MultiChangesFeed(options.ChangesCtx, channels, options)
2851
2852 require.NoError(t, err)
2853 require.NotNil(t, feed)
2854 var changes = make([]*ChangeEntry, 0, 50)
2855 for entry := range feed {
2856 changes = append(changes, entry)
2857 }
2858 return changes
2859}
2860
2861func TestBroadcastFrequencyAfterSkippedCompact(t *testing.T) {
2862 base.SetUpTestLogging(t, base.LevelDebug, base.KeyCache)

Calls 1

MultiChangesFeedMethod · 0.80

Tested by

no test coverage detected