@@ -246,29 +246,9 @@ func IngestOneEventForStaticSchemaStream_SameFieldsInLog(t *testing.T, client HT
246
246
}
247
247
248
248
func QueryLogStreamCount (t * testing.T , client HTTPClient , stream string , count uint64 ) {
249
- // Query last 10 minutes of data only
249
+ // Query last 30 minutes of data only
250
250
endTime := time .Now ().Add (time .Second ).Format (time .RFC3339Nano )
251
- startTime := time .Now ().Add (- 10 * time .Minute ).Format (time .RFC3339Nano )
252
-
253
- query := map [string ]interface {}{
254
- "query" : "select count(*) as count from " + stream ,
255
- "startTime" : startTime ,
256
- "endTime" : endTime ,
257
- }
258
- queryJSON , _ := json .Marshal (query )
259
- req , _ := client .NewRequest ("POST" , "query" , bytes .NewBuffer (queryJSON ))
260
- response , err := client .Do (req )
261
- require .NoErrorf (t , err , "Request failed: %s" , err )
262
- body := readAsString (response .Body )
263
- require .Equalf (t , 200 , response .StatusCode , "Server returned http code: %s and response: %s" , response .Status , body )
264
- expected := fmt .Sprintf (`[{"count":%d}]` , count )
265
- require .Equalf (t , expected , body , "Query count incorrect; Expected %s, Actual %s" , expected , body )
266
- }
267
-
268
- func QueryLogStreamCount_WithTimePartition (t * testing.T , client HTTPClient , stream string , count uint64 ) {
269
- // Query last 10 minutes of data only
270
- endTime := "2024-05-17T10:00:00.000Z"
271
- startTime := "2024-05-17T08:00:00.000Z"
251
+ startTime := time .Now ().Add (- 30 * time .Minute ).Format (time .RFC3339Nano )
272
252
273
253
query := map [string ]interface {}{
274
254
"query" : "select count(*) as count from " + stream ,
@@ -286,9 +266,9 @@ func QueryLogStreamCount_WithTimePartition(t *testing.T, client HTTPClient, stre
286
266
}
287
267
288
268
func QueryTwoLogStreamCount (t * testing.T , client HTTPClient , stream1 string , stream2 string , count uint64 ) {
289
- // Query last 10 minutes of data only
269
+ // Query last 30 minutes of data only
290
270
endTime := time .Now ().Add (time .Second ).Format (time .RFC3339Nano )
291
- startTime := time .Now ().Add (- 10 * time .Minute ).Format (time .RFC3339Nano )
271
+ startTime := time .Now ().Add (- 30 * time .Minute ).Format (time .RFC3339Nano )
292
272
293
273
query := map [string ]interface {}{
294
274
"query" : fmt .Sprintf ("select sum(c) as count from (select count(*) as c from %s union all select count(*) as c from %s)" , stream1 , stream2 ),
@@ -306,9 +286,9 @@ func QueryTwoLogStreamCount(t *testing.T, client HTTPClient, stream1 string, str
306
286
}
307
287
308
288
func AssertQueryOK (t * testing.T , client HTTPClient , query string , args ... any ) {
309
- // Query last 10 minutes of data only
289
+ // Query last 30 minutes of data only
310
290
endTime := time .Now ().Add (time .Second ).Format (time .RFC3339Nano )
311
- startTime := time .Now ().Add (- 10 * time .Minute ).Format (time .RFC3339Nano )
291
+ startTime := time .Now ().Add (- 30 * time .Minute ).Format (time .RFC3339Nano )
312
292
313
293
var finalQuery string
314
294
if len (args ) == 0 {
0 commit comments