github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/internal/graph/graph_test.go (about)

     1  package graph
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/require"
     7  
     8  	"github.com/authzed/spicedb/pkg/datastore"
     9  )
    10  
    11  func TestChunkSizes(t *testing.T) {
    12  	for index, cs := range progressiveDispatchChunkSizes {
    13  		require.LessOrEqual(t, cs, datastore.FilterMaximumIDCount)
    14  		if index > 0 {
    15  			require.Greater(t, cs, progressiveDispatchChunkSizes[index-1])
    16  		}
    17  	}
    18  }
    19  
    20  func TestMaxDispatchChunkSize(t *testing.T) {
    21  	require.LessOrEqual(t, maxDispatchChunkSize, datastore.FilterMaximumIDCount)
    22  }