func (s *CassandraSuite) initSchema() {
	targets := []string{"type", "table"}
	queriesCass22 := []string{
		fmt.Sprintf("select type_name from system.schema_usertypes where keyspace_name='%s'", s.keyspace),
		fmt.Sprintf("select columnfamily_name from system.schema_columnfamilies where keyspace_name='%s'", s.keyspace),
	}
	for i, target := range targets {
		var names []string
		var qry string
		var name string
		qry = queriesCass22[i]
		iter := s.TestCluster.session.Query(qry).Iter()
		for iter.Scan(&name) {
			names = append(names, name)
		}
		err := iter.Close()
		if err != nil {
			queriesCass3 := []string{
				fmt.Sprintf("select type_name from system_schema.types where keyspace_name='%s'", s.keyspace),
				fmt.Sprintf("select table_name from system_schema.tables where keyspace_name='%s'", s.keyspace),
			}
			names = []string{}
			qry = queriesCass3[i]
			iter = s.TestCluster.session.Query(qry).Iter()
			name = ""
			for iter.Scan(&name) {
				names = append(names, name)
			}
			err = iter.Close()
		}
		s.Nil(err, "Failed to close iterator")
		if target == "type" {
			s.typeNames = names
		} else if target == "table" {
			s.tableNames = names
		}
	}
}
initSchema does a desc keyspace and discovers the
table / type names. This is to fuzz the
table / types during test
package metadata
import (
	"fmt"
	"math/rand"
	"os"
	"reflect"
	"sort"
	"strconv"
	"strings"
	"sync/atomic"
	"testing"
	"time"
	"github.com/pborman/uuid"
	"github.com/stretchr/testify/require"
	"github.com/stretchr/testify/suite"
	"github.com/uber/cherami-server/common"
	"github.com/uber/cherami-server/common/set"
	m "github.com/uber/cherami-thrift/.generated/go/metadata"
	"github.com/uber/cherami-thrift/.generated/go/shared"
	log "github.com/sirupsen/logrus"
)
type CassandraSuite struct {
	*require.Assertions  
	seqNum              int32
	tableNames          []string
	typeNames           []string
	suite.Suite
	TestCluster
}
const testPageSize = 2
func TestCassandraSuite(t *testing.T) {
	s := new(CassandraSuite)
	suite.Run(t, s)
}
func (s *CassandraSuite) SetupSuite() {
	s.Assertions = require.New(s.T())  
	s.TestCluster.SetupTestCluster()
	s.seqNum = rand.Int31n(10000)
	if testing.Verbose() {
		log.SetOutput(os.Stdout)
	}
	s.initSchema()
}
func (s *CassandraSuite) TearDownSuite() {
	s.TestCluster.TearDownTestCluster()
}
func (s *CassandraSuite) generateName(prefix string) string {
	seq := int(atomic.AddInt32(&s.seqNum, 1))
	return strings.Join([]string{prefix, strconv.Itoa(seq)}, "_")
}