Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove time partition tests #98

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
254 changes: 127 additions & 127 deletions quest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,41 +80,41 @@ func TestSmokeIngestEventsToStream(t *testing.T) {
DeleteStream(t, NewGlob.QueryClient, NewGlob.Stream)
}

func TestTimePartition_TimeStampMismatch(t *testing.T) {
historicalStream := NewGlob.Stream + "historical"
timeHeader := map[string]string{"X-P-Time-Partition": "source_time"}
CreateStreamWithHeader(t, NewGlob.QueryClient, historicalStream, timeHeader)
if NewGlob.IngestorUrl.String() == "" {
IngestOneEventWithTimePartition_TimeStampMismatch(t, NewGlob.QueryClient, historicalStream)
} else {
IngestOneEventWithTimePartition_TimeStampMismatch(t, NewGlob.IngestorClient, historicalStream)
}
DeleteStream(t, NewGlob.QueryClient, historicalStream)
}
// func TestTimePartition_TimeStampMismatch(t *testing.T) {
// historicalStream := NewGlob.Stream + "historical"
// timeHeader := map[string]string{"X-P-Time-Partition": "source_time"}
// CreateStreamWithHeader(t, NewGlob.QueryClient, historicalStream, timeHeader)
// if NewGlob.IngestorUrl.String() == "" {
// IngestOneEventWithTimePartition_TimeStampMismatch(t, NewGlob.QueryClient, historicalStream)
// } else {
// IngestOneEventWithTimePartition_TimeStampMismatch(t, NewGlob.IngestorClient, historicalStream)
// }
// DeleteStream(t, NewGlob.QueryClient, historicalStream)
// }

func TestTimePartition_NoTimePartitionInLog(t *testing.T) {
historicalStream := NewGlob.Stream + "historical"
timeHeader := map[string]string{"X-P-Time-Partition": "source_time"}
CreateStreamWithHeader(t, NewGlob.QueryClient, historicalStream, timeHeader)
if NewGlob.IngestorUrl.String() == "" {
IngestOneEventWithTimePartition_NoTimePartitionInLog(t, NewGlob.QueryClient, historicalStream)
} else {
IngestOneEventWithTimePartition_NoTimePartitionInLog(t, NewGlob.IngestorClient, historicalStream)
}
DeleteStream(t, NewGlob.QueryClient, historicalStream)
}
// func TestTimePartition_NoTimePartitionInLog(t *testing.T) {
// historicalStream := NewGlob.Stream + "historical"
// timeHeader := map[string]string{"X-P-Time-Partition": "source_time"}
// CreateStreamWithHeader(t, NewGlob.QueryClient, historicalStream, timeHeader)
// if NewGlob.IngestorUrl.String() == "" {
// IngestOneEventWithTimePartition_NoTimePartitionInLog(t, NewGlob.QueryClient, historicalStream)
// } else {
// IngestOneEventWithTimePartition_NoTimePartitionInLog(t, NewGlob.IngestorClient, historicalStream)
// }
// DeleteStream(t, NewGlob.QueryClient, historicalStream)
// }

func TestTimePartition_IncorrectDateTimeFormatTimePartitionInLog(t *testing.T) {
historicalStream := NewGlob.Stream + "historical"
timeHeader := map[string]string{"X-P-Time-Partition": "source_time"}
CreateStreamWithHeader(t, NewGlob.QueryClient, historicalStream, timeHeader)
if NewGlob.IngestorUrl.String() == "" {
IngestOneEventWithTimePartition_IncorrectDateTimeFormatTimePartitionInLog(t, NewGlob.QueryClient, historicalStream)
} else {
IngestOneEventWithTimePartition_IncorrectDateTimeFormatTimePartitionInLog(t, NewGlob.IngestorClient, historicalStream)
}
DeleteStream(t, NewGlob.QueryClient, historicalStream)
}
// func TestTimePartition_IncorrectDateTimeFormatTimePartitionInLog(t *testing.T) {
// historicalStream := NewGlob.Stream + "historical"
// timeHeader := map[string]string{"X-P-Time-Partition": "source_time"}
// CreateStreamWithHeader(t, NewGlob.QueryClient, historicalStream, timeHeader)
// if NewGlob.IngestorUrl.String() == "" {
// IngestOneEventWithTimePartition_IncorrectDateTimeFormatTimePartitionInLog(t, NewGlob.QueryClient, historicalStream)
// } else {
// IngestOneEventWithTimePartition_IncorrectDateTimeFormatTimePartitionInLog(t, NewGlob.IngestorClient, historicalStream)
// }
// DeleteStream(t, NewGlob.QueryClient, historicalStream)
// }

func TestLoadStream_StaticSchema_EventWithSameFields(t *testing.T) {
staticSchemaStream := NewGlob.Stream + "staticschema"
Expand Down Expand Up @@ -562,54 +562,54 @@ func TestLoadStreamBatchWithK6(t *testing.T) {
}
}

func TestLoadHistoricalStreamBatchWithK6(t *testing.T) {
if NewGlob.Mode == "load" {
historicalStream := NewGlob.Stream + "historical"
timeHeader := map[string]string{"X-P-Time-Partition": "source_time"}
CreateStreamWithHeader(t, NewGlob.QueryClient, historicalStream, timeHeader)
if NewGlob.IngestorUrl.String() == "" {
cmd := exec.Command("k6",
"run",
"-e", fmt.Sprintf("P_URL=%s", NewGlob.QueryUrl.String()),
"-e", fmt.Sprintf("P_USERNAME=%s", NewGlob.QueryUsername),
"-e", fmt.Sprintf("P_PASSWORD=%s", NewGlob.QueryPassword),
"-e", fmt.Sprintf("P_STREAM=%s", historicalStream),
"-e", fmt.Sprintf("P_SCHEMA_COUNT=%s", schema_count),
"-e", fmt.Sprintf("P_EVENTS_COUNT=%s", events_count),
"./scripts/load_historical_batch_events.js",
"--vus=", vus,
"--duration=", duration)

cmd.Run()
op, err := cmd.Output()
if err != nil {
t.Log(err)
}
t.Log(string(op))
} else {
cmd := exec.Command("k6",
"run",
"-e", fmt.Sprintf("P_URL=%s", NewGlob.IngestorUrl.String()),
"-e", fmt.Sprintf("P_USERNAME=%s", NewGlob.IngestorUsername),
"-e", fmt.Sprintf("P_PASSWORD=%s", NewGlob.IngestorPassword),
"-e", fmt.Sprintf("P_STREAM=%s", historicalStream),
"-e", fmt.Sprintf("P_SCHEMA_COUNT=%s", schema_count),
"-e", fmt.Sprintf("P_EVENTS_COUNT=%s", events_count),
"./scripts/load_historical_batch_events.js",
"--vus=", vus,
"--duration=", duration)

cmd.Run()
op, err := cmd.Output()
if err != nil {
t.Log(err)
}
t.Log(string(op))
}

DeleteStream(t, NewGlob.QueryClient, historicalStream)
}
}
// func TestLoadHistoricalStreamBatchWithK6(t *testing.T) {
// if NewGlob.Mode == "load" {
// historicalStream := NewGlob.Stream + "historical"
// timeHeader := map[string]string{"X-P-Time-Partition": "source_time"}
// CreateStreamWithHeader(t, NewGlob.QueryClient, historicalStream, timeHeader)
// if NewGlob.IngestorUrl.String() == "" {
// cmd := exec.Command("k6",
// "run",
// "-e", fmt.Sprintf("P_URL=%s", NewGlob.QueryUrl.String()),
// "-e", fmt.Sprintf("P_USERNAME=%s", NewGlob.QueryUsername),
// "-e", fmt.Sprintf("P_PASSWORD=%s", NewGlob.QueryPassword),
// "-e", fmt.Sprintf("P_STREAM=%s", historicalStream),
// "-e", fmt.Sprintf("P_SCHEMA_COUNT=%s", schema_count),
// "-e", fmt.Sprintf("P_EVENTS_COUNT=%s", events_count),
// "./scripts/load_historical_batch_events.js",
// "--vus=", vus,
// "--duration=", duration)

// cmd.Run()
// op, err := cmd.Output()
// if err != nil {
// t.Log(err)
// }
// t.Log(string(op))
// } else {
// cmd := exec.Command("k6",
// "run",
// "-e", fmt.Sprintf("P_URL=%s", NewGlob.IngestorUrl.String()),
// "-e", fmt.Sprintf("P_USERNAME=%s", NewGlob.IngestorUsername),
// "-e", fmt.Sprintf("P_PASSWORD=%s", NewGlob.IngestorPassword),
// "-e", fmt.Sprintf("P_STREAM=%s", historicalStream),
// "-e", fmt.Sprintf("P_SCHEMA_COUNT=%s", schema_count),
// "-e", fmt.Sprintf("P_EVENTS_COUNT=%s", events_count),
// "./scripts/load_historical_batch_events.js",
// "--vus=", vus,
// "--duration=", duration)

// cmd.Run()
// op, err := cmd.Output()
// if err != nil {
// t.Log(err)
// }
// t.Log(string(op))
// }

// DeleteStream(t, NewGlob.QueryClient, historicalStream)
// }
// }

func TestLoadStreamBatchWithCustomPartitionWithK6(t *testing.T) {
customPartitionStream := NewGlob.Stream + "custompartition"
Expand Down Expand Up @@ -702,52 +702,52 @@ func TestLoadStreamNoBatchWithK6(t *testing.T) {
}
}

func TestLoadHistoricalStreamNoBatchWithK6(t *testing.T) {
if NewGlob.Mode == "load" {
historicalStream := NewGlob.Stream + "historical"
timeHeader := map[string]string{"X-P-Time-Partition": "source_time"}
CreateStreamWithHeader(t, NewGlob.QueryClient, historicalStream, timeHeader)
if NewGlob.IngestorUrl.String() == "" {
cmd := exec.Command("k6",
"run",
"-e", fmt.Sprintf("P_URL=%s", NewGlob.QueryUrl.String()),
"-e", fmt.Sprintf("P_USERNAME=%s", NewGlob.QueryUsername),
"-e", fmt.Sprintf("P_PASSWORD=%s", NewGlob.QueryPassword),
"-e", fmt.Sprintf("P_STREAM=%s", historicalStream),
"-e", fmt.Sprintf("P_SCHEMA_COUNT=%s", schema_count),
"./scripts/load_single_events.js",
"--vus=", vus,
"--duration=", duration)

cmd.Run()
op, err := cmd.Output()
if err != nil {
t.Log(err)
}
t.Log(string(op))
} else {
cmd := exec.Command("k6",
"run",
"-e", fmt.Sprintf("P_URL=%s", NewGlob.IngestorUrl.String()),
"-e", fmt.Sprintf("P_USERNAME=%s", NewGlob.IngestorUsername),
"-e", fmt.Sprintf("P_PASSWORD=%s", NewGlob.IngestorPassword),
"-e", fmt.Sprintf("P_STREAM=%s", historicalStream),
"-e", fmt.Sprintf("P_SCHEMA_COUNT=%s", schema_count),
"./scripts/load_single_events.js",
"--vus=", vus,
"--duration=", duration)

cmd.Run()
op, err := cmd.Output()
if err != nil {
t.Log(err)
}
t.Log(string(op))
}

DeleteStream(t, NewGlob.QueryClient, historicalStream)
}
}
// func TestLoadHistoricalStreamNoBatchWithK6(t *testing.T) {
// if NewGlob.Mode == "load" {
// historicalStream := NewGlob.Stream + "historical"
// timeHeader := map[string]string{"X-P-Time-Partition": "source_time"}
// CreateStreamWithHeader(t, NewGlob.QueryClient, historicalStream, timeHeader)
// if NewGlob.IngestorUrl.String() == "" {
// cmd := exec.Command("k6",
// "run",
// "-e", fmt.Sprintf("P_URL=%s", NewGlob.QueryUrl.String()),
// "-e", fmt.Sprintf("P_USERNAME=%s", NewGlob.QueryUsername),
// "-e", fmt.Sprintf("P_PASSWORD=%s", NewGlob.QueryPassword),
// "-e", fmt.Sprintf("P_STREAM=%s", historicalStream),
// "-e", fmt.Sprintf("P_SCHEMA_COUNT=%s", schema_count),
// "./scripts/load_single_events.js",
// "--vus=", vus,
// "--duration=", duration)

// cmd.Run()
// op, err := cmd.Output()
// if err != nil {
// t.Log(err)
// }
// t.Log(string(op))
// } else {
// cmd := exec.Command("k6",
// "run",
// "-e", fmt.Sprintf("P_URL=%s", NewGlob.IngestorUrl.String()),
// "-e", fmt.Sprintf("P_USERNAME=%s", NewGlob.IngestorUsername),
// "-e", fmt.Sprintf("P_PASSWORD=%s", NewGlob.IngestorPassword),
// "-e", fmt.Sprintf("P_STREAM=%s", historicalStream),
// "-e", fmt.Sprintf("P_SCHEMA_COUNT=%s", schema_count),
// "./scripts/load_single_events.js",
// "--vus=", vus,
// "--duration=", duration)

// cmd.Run()
// op, err := cmd.Output()
// if err != nil {
// t.Log(err)
// }
// t.Log(string(op))
// }

// DeleteStream(t, NewGlob.QueryClient, historicalStream)
// }
// }

func TestLoadStreamNoBatchWithCustomPartitionWithK6(t *testing.T) {
customPartitionStream := NewGlob.Stream + "custompartition"
Expand Down