File tree Expand file tree Collapse file tree 3 files changed +102
-0
lines changed
test/spec/collection-management Expand file tree Collapse file tree 3 files changed +102
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ export interface TimeSeriesCollectionOptions extends Document {
4646 timeField : string ;
4747 metaField ?: string ;
4848 granularity ?: 'seconds' | 'minutes' | 'hours' | string ;
49+ bucketMaxSpanSeconds ?: number ;
50+ bucketRoundingSeconds ?: number ;
4951}
5052
5153/** @public
Original file line number Diff line number Diff line change 250250 ]
251251 }
252252 ]
253+ },
254+ {
255+ "description" : " createCollection with bucketing options" ,
256+ "runOnRequirements" : [
257+ {
258+ "minServerVersion" : " 7.0"
259+ }
260+ ],
261+ "operations" : [
262+ {
263+ "name" : " dropCollection" ,
264+ "object" : " database0" ,
265+ "arguments" : {
266+ "collection" : " test"
267+ }
268+ },
269+ {
270+ "name" : " createCollection" ,
271+ "object" : " database0" ,
272+ "arguments" : {
273+ "collection" : " test" ,
274+ "timeseries" : {
275+ "timeField" : " time" ,
276+ "bucketMaxSpanSeconds" : 3600 ,
277+ "bucketRoundingSeconds" : 3600
278+ }
279+ }
280+ },
281+ {
282+ "name" : " assertCollectionExists" ,
283+ "object" : " testRunner" ,
284+ "arguments" : {
285+ "databaseName" : " ts-tests" ,
286+ "collectionName" : " test"
287+ }
288+ }
289+ ],
290+ "expectEvents" : [
291+ {
292+ "client" : " client0" ,
293+ "events" : [
294+ {
295+ "commandStartedEvent" : {
296+ "command" : {
297+ "drop" : " test"
298+ },
299+ "databaseName" : " ts-tests"
300+ }
301+ },
302+ {
303+ "commandStartedEvent" : {
304+ "command" : {
305+ "create" : " test" ,
306+ "timeseries" : {
307+ "timeField" : " time" ,
308+ "bucketMaxSpanSeconds" : 3600 ,
309+ "bucketRoundingSeconds" : 3600
310+ }
311+ },
312+ "databaseName" : " ts-tests"
313+ }
314+ }
315+ ]
316+ }
317+ ]
253318 }
254319 ]
255320}
Original file line number Diff line number Diff line change @@ -127,3 +127,38 @@ tests:
127127 filter : {}
128128 sort : { time: 1 }
129129 databaseName : *database0Name
130+
131+ - description : " createCollection with bucketing options"
132+ runOnRequirements :
133+ - minServerVersion : " 7.0"
134+ operations :
135+ - name : dropCollection
136+ object : *database0
137+ arguments :
138+ collection : *collection0Name
139+ - name : createCollection
140+ object : *database0
141+ arguments :
142+ collection : *collection0Name
143+ timeseries : ×eries1
144+ timeField : " time"
145+ bucketMaxSpanSeconds : 3600
146+ bucketRoundingSeconds : 3600
147+ - name : assertCollectionExists
148+ object : testRunner
149+ arguments :
150+ databaseName : *database0Name
151+ collectionName : *collection0Name
152+ expectEvents :
153+ - client : *client0
154+ events :
155+ - commandStartedEvent :
156+ command :
157+ drop : *collection0Name
158+ databaseName : *database0Name
159+ - commandStartedEvent :
160+ command :
161+ create : *collection0Name
162+ timeseries : *timeseries1
163+ databaseName : *database0Name
164+
You can’t perform that action at this time.
0 commit comments