@@ -111,7 +111,7 @@ function partitionKeyJson(str: string): any {
111111 return JSON . stringify ( JSON . parse ( str . replace ( '.index' , '' ) . replace ( '.values' , '' ) ) ) ;
112112}
113113
114- tplTest . for ( [
114+ tplTest . concurrent . for ( [
115115 { partitionKeyLength : 0 , storageFormat : 'Binary' } ,
116116 { partitionKeyLength : 1 , storageFormat : 'Binary' } ,
117117 { partitionKeyLength : 2 , storageFormat : 'Binary' } ,
@@ -128,7 +128,7 @@ tplTest.for([
128128 // execution takes 1-2 seconds at most.
129129 { timeout : 30000 } ,
130130 async ( { partitionKeyLength, storageFormat } , { helper, expect, driverKit } ) => {
131- const spec = baseSpec ;
131+ const spec = deepClone ( baseSpec ) ;
132132 spec . partitionKeyLength = partitionKeyLength ;
133133 spec . storageFormat = storageFormat ;
134134 const expectedPKeys = [ ...expectedPartitionKeys ( spec ) ] . sort ( ) ;
@@ -228,7 +228,7 @@ function superPartitionKeys(keyLen: number): string[] {
228228 return r ;
229229}
230230
231- tplTest . for ( [
231+ tplTest . concurrent . for ( [
232232 {
233233 superPartitionKeyLength : 0 ,
234234 partitionKeyLength : 0 ,
@@ -284,7 +284,7 @@ tplTest.for([
284284 { timeout : 30000 } ,
285285 async ( { superPartitionKeyLength, partitionKeyLength, storageFormat } , { helper, expect } ) => {
286286 const supKeys = superPartitionKeys ( superPartitionKeyLength ) . sort ( ) ;
287- const spec = baseSpec ;
287+ const spec = deepClone ( baseSpec ) ;
288288 spec . partitionKeyLength = partitionKeyLength ;
289289 spec . storageFormat = storageFormat ;
290290 // inner keys
@@ -393,7 +393,7 @@ tplTest.for([
393393 } ,
394394) ;
395395
396- tplTest . for ( [
396+ tplTest . concurrent . for ( [
397397 {
398398 superPartitionKeyLength : 0 ,
399399 partitionKeyLength : 0 ,
@@ -449,7 +449,7 @@ tplTest.for([
449449 { timeout : 30000 } ,
450450 async ( { superPartitionKeyLength, partitionKeyLength, storageFormat } , { helper, expect } ) => {
451451 const supKeys = superPartitionKeys ( superPartitionKeyLength ) . sort ( ) ;
452- const spec = baseSpec ;
452+ const spec = deepClone ( baseSpec ) ;
453453 spec . partitionKeyLength = partitionKeyLength ;
454454 spec . storageFormat = storageFormat ;
455455 // inner keys
@@ -548,3 +548,7 @@ tplTest.for([
548548 }
549549 } ,
550550) ;
551+
552+ function deepClone < T > ( obj : T ) : T {
553+ return JSON . parse ( JSON . stringify ( obj ) ) ;
554+ }
0 commit comments