Skip to content

Commit

Permalink
fix in integrity test and quest test files for distributed and standa…
Browse files Browse the repository at this point in the history
…lone parseable deployments
  • Loading branch information
nikhilsinhaparseable committed Apr 23, 2024
1 parent 67c474c commit 219da6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions integrity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func (flog *ParquetFlog) Deref() Flog {
// - Download parquet files from the store created by Parseable for the minute
// - Compare the sent logs with the ones loaded from the downloaded parquet
func TestIntegrity(t *testing.T) {
CreateStream(t, NewGlob.QueryClient, NewGlob.Stream)
iterations := 2
flogsPerIteration := 100

Expand Down
16 changes: 8 additions & 8 deletions quest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const (
)

func TestSmokeListLogStream(t *testing.T) {
CreateStream(t, NewGlob.QueryClient, NewGlob.Stream)
req, err := NewGlob.QueryClient.NewRequest("GET", "logstream", nil)
require.NoErrorf(t, err, "Request failed: %s", err)

Expand All @@ -51,6 +52,7 @@ func TestSmokeListLogStream(t *testing.T) {
}
}
}
DeleteStream(t, NewGlob.QueryClient, NewGlob.Stream)
}

func TestSmokeCreateStream(t *testing.T) {
Expand Down Expand Up @@ -193,8 +195,9 @@ func TestSmokeQueryTwoStreams(t *testing.T) {
} else {
RunFlog(t, NewGlob.IngestorClient, stream1)
RunFlog(t, NewGlob.IngestorClient, stream2)
time.Sleep(60 * time.Second)

}
time.Sleep(60 * time.Second)
QueryTwoLogStreamCount(t, NewGlob.QueryClient, stream1, stream2, 100)
DeleteStream(t, NewGlob.QueryClient, stream1)
DeleteStream(t, NewGlob.QueryClient, stream2)
Expand All @@ -206,9 +209,9 @@ func TestSmokeRunQueries(t *testing.T) {
RunFlog(t, NewGlob.QueryClient, NewGlob.Stream)
} else {
RunFlog(t, NewGlob.IngestorClient, NewGlob.Stream)
time.Sleep(60 * time.Second)
}

}
time.Sleep(60 * time.Second)
// test count
QueryLogStreamCount(t, NewGlob.QueryClient, NewGlob.Stream, 50)
// test yeild all values
Expand Down Expand Up @@ -252,7 +255,7 @@ func TestSmokeLoadWithK6Stream(t *testing.T) {
cmd.Run()
cmd.Output()
}

time.Sleep(60 * time.Second)
QueryLogStreamCount(t, NewGlob.QueryClient, NewGlob.Stream, 60000)
AssertStreamSchema(t, NewGlob.QueryClient, NewGlob.Stream, SchemaBody)
DeleteStream(t, NewGlob.QueryClient, NewGlob.Stream)
Expand All @@ -266,7 +269,7 @@ func TestSmokeSetAlert(t *testing.T) {
response, err := NewGlob.QueryClient.Do(req)
require.NoErrorf(t, err, "Request failed: %s", err)
require.Equalf(t, 200, response.StatusCode, "Server returned http code: %s and response: %s", response.Status, readAsString(response.Body))

DeleteStream(t, NewGlob.QueryClient, NewGlob.Stream)
}

}
Expand All @@ -292,12 +295,10 @@ func TestSmokeSetRetention(t *testing.T) {
response, err := NewGlob.QueryClient.Do(req)
require.NoErrorf(t, err, "Request failed: %s", err)
require.Equalf(t, 200, response.StatusCode, "Server returned http code: %s and response: %s", response.Status, readAsString(response.Body))
DeleteStream(t, NewGlob.QueryClient, NewGlob.Stream)

}

func TestSmokeGetRetention(t *testing.T) {
CreateStream(t, NewGlob.QueryClient, NewGlob.Stream)
req, _ := NewGlob.QueryClient.NewRequest("GET", "logstream/"+NewGlob.Stream+"/retention", nil)
response, err := NewGlob.QueryClient.Do(req)
require.NoErrorf(t, err, "Request failed: %s", err)
Expand Down Expand Up @@ -540,7 +541,6 @@ func TestLoadStreamNoBatchWithK6(t *testing.T) {
}
t.Log(string(op))
}
DeleteStream(t, NewGlob.QueryClient, NewGlob.Stream)

}
}
Expand Down

0 comments on commit 219da6e

Please sign in to comment.