mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-09 12:27:52 +00:00
clean up time quantum test
This commit is contained in:
parent
67d247a479
commit
26747362e1
1 changed files with 7 additions and 25 deletions
|
|
@ -643,11 +643,11 @@ func TestCmdSchemaChange(t *testing.T) {
|
|||
func TestTimeQuantums(t *testing.T) {
|
||||
t.Parallel()
|
||||
/*
|
||||
at a high level, a test here represents
|
||||
- an avro schema
|
||||
- a set of records to ingest to kafka
|
||||
- an ingest configuration
|
||||
- query to run to confirm the data was ingest properly
|
||||
at a high level, a test here represents
|
||||
- an avro schema
|
||||
- a set of records to ingest to kafka
|
||||
- an ingest configuration
|
||||
- query to run to confirm the data was ingest properly
|
||||
*/
|
||||
tests := []struct {
|
||||
name string
|
||||
|
|
@ -687,11 +687,7 @@ func TestTimeQuantums(t *testing.T) {
|
|||
},
|
||||
}
|
||||
|
||||
fmt.Printf("created tests")
|
||||
|
||||
for _, test := range tests {
|
||||
|
||||
fmt.Printf("starting test")
|
||||
// define some vars
|
||||
now := time.Now().UnixNano()
|
||||
index := fmt.Sprintf("%s_%d", test.index, now)
|
||||
|
|
@ -716,18 +712,6 @@ func TestTimeQuantums(t *testing.T) {
|
|||
data = make(map[string]interface{})
|
||||
}
|
||||
|
||||
/*
|
||||
records, err := ioutil.ReadFile(test.pathToRecords)
|
||||
if err != nil {
|
||||
t.Errorf("issue reading records file")
|
||||
}
|
||||
err = json.Unmarshal(records, &data)
|
||||
if err != nil {
|
||||
t.Errorf("unmarshal json: %s", err)
|
||||
}
|
||||
*/
|
||||
fmt.Printf("finished reading records")
|
||||
|
||||
// configure the consumer
|
||||
consumer, err := NewMain()
|
||||
if err != nil {
|
||||
|
|
@ -736,8 +720,8 @@ func TestTimeQuantums(t *testing.T) {
|
|||
configureTestFlags(consumer)
|
||||
consumer.Index = index
|
||||
consumer.Topics = []string{topic}
|
||||
//consumer.KafkaBootstrapServers = []string{test.kafkaHost}
|
||||
//consumer.SchemaRegistryURL = test.registryURL
|
||||
consumer.KafkaBootstrapServers = []string{test.kafkaHost}
|
||||
consumer.SchemaRegistryURL = test.registryURL
|
||||
switch test.idType {
|
||||
case "id":
|
||||
consumer.IDField = test.keyField
|
||||
|
|
@ -751,8 +735,6 @@ func TestTimeQuantums(t *testing.T) {
|
|||
}
|
||||
consumer.MaxMsgs = uint64(len(records))
|
||||
|
||||
fmt.Println("finished configuring the consumer")
|
||||
|
||||
// load schema registry, create produce, topic and run consumer data
|
||||
licodec := liDecodeTestSchema(t, test.pathToAvroSchema)
|
||||
schemaID := postSchema(t, test.pathToAvroSchema, fmt.Sprintf("%s_id", topic), consumer.SchemaRegistryURL, nil)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue