@@ -562,8 +562,8 @@ export function runIntegrationTests(codec?: PayloadCodec): void {
562
562
workflowId : uuid4 ( ) ,
563
563
searchAttributes : {
564
564
CustomKeywordField : [ 'test-value' ] ,
565
- CustomIntField : [ 1 , 2 ] ,
566
- CustomDatetimeField : [ date , date ] ,
565
+ CustomIntField : [ 1 ] ,
566
+ CustomDatetimeField : [ date ] ,
567
567
} ,
568
568
memo : {
569
569
note : 'foo' ,
@@ -575,8 +575,8 @@ export function runIntegrationTests(codec?: PayloadCodec): void {
575
575
t . deepEqual ( execution . memo , { note : 'foo' } ) ;
576
576
t . true ( execution . startTime instanceof Date ) ;
577
577
t . deepEqual ( execution . searchAttributes ! . CustomKeywordField , [ 'test-value' ] ) ;
578
- t . deepEqual ( execution . searchAttributes ! . CustomIntField , [ 1 , 2 ] ) ;
579
- t . deepEqual ( execution . searchAttributes ! . CustomDatetimeField , [ date , date ] ) ;
578
+ t . deepEqual ( execution . searchAttributes ! . CustomIntField , [ 1 ] ) ;
579
+ t . deepEqual ( execution . searchAttributes ! . CustomDatetimeField , [ date ] ) ;
580
580
t . regex ( ( execution . searchAttributes ! . BinaryChecksums as string [ ] ) [ 0 ] , / @ t e m p o r a l i o \/ w o r k e r @ / ) ;
581
581
} ) ;
582
582
@@ -588,15 +588,15 @@ export function runIntegrationTests(codec?: PayloadCodec): void {
588
588
workflowId : uuid4 ( ) ,
589
589
searchAttributes : {
590
590
CustomKeywordField : [ 'test-value' ] ,
591
- CustomIntField : [ 1 , 2 ] ,
592
- CustomDatetimeField : [ date , date ] ,
591
+ CustomIntField : [ 1 ] ,
592
+ CustomDatetimeField : [ date ] ,
593
593
} ,
594
594
} ) ;
595
595
const result = await workflow . result ( ) ;
596
596
t . deepEqual ( result , {
597
597
CustomKeywordField : [ 'test-value' ] ,
598
- CustomIntField : [ 1 , 2 ] ,
599
- CustomDatetimeField : [ date . toISOString ( ) , date . toISOString ( ) ] ,
598
+ CustomIntField : [ 1 ] ,
599
+ CustomDatetimeField : [ date . toISOString ( ) ] ,
600
600
datetimeInstanceofWorks : [ true ] ,
601
601
arrayInstanceofWorks : [ true ] ,
602
602
datetimeType : [ 'Date' ] ,
@@ -825,7 +825,7 @@ export function runIntegrationTests(codec?: PayloadCodec): void {
825
825
} ,
826
826
searchAttributes : {
827
827
CustomKeywordField : [ 'test-value' ] ,
828
- CustomIntField : [ 1 , 2 ] ,
828
+ CustomIntField : [ 1 ] ,
829
829
} ,
830
830
followRuns : true ,
831
831
} ) ;
@@ -836,7 +836,7 @@ export function runIntegrationTests(codec?: PayloadCodec): void {
836
836
t . not ( execution . runId , workflow . firstExecutionRunId ) ;
837
837
t . deepEqual ( execution . memo , { note : 'foo' } ) ;
838
838
t . deepEqual ( execution . searchAttributes ! . CustomKeywordField , [ 'test-value' ] ) ;
839
- t . deepEqual ( execution . searchAttributes ! . CustomIntField , [ 1 , 2 ] ) ;
839
+ t . deepEqual ( execution . searchAttributes ! . CustomIntField , [ 1 ] ) ;
840
840
} ) ;
841
841
842
842
test ( 'continue-as-new-to-different-workflow keeps memo and search attributes by default' , async ( t ) => {
@@ -850,7 +850,7 @@ export function runIntegrationTests(codec?: PayloadCodec): void {
850
850
} ,
851
851
searchAttributes : {
852
852
CustomKeywordField : [ 'test-value' ] ,
853
- CustomIntField : [ 1 , 2 ] ,
853
+ CustomIntField : [ 1 ] ,
854
854
} ,
855
855
} ) ;
856
856
await workflow . result ( ) ;
@@ -859,7 +859,7 @@ export function runIntegrationTests(codec?: PayloadCodec): void {
859
859
t . not ( info . runId , workflow . firstExecutionRunId ) ;
860
860
t . deepEqual ( info . memo , { note : 'foo' } ) ;
861
861
t . deepEqual ( info . searchAttributes ! . CustomKeywordField , [ 'test-value' ] ) ;
862
- t . deepEqual ( info . searchAttributes ! . CustomIntField , [ 1 , 2 ] ) ;
862
+ t . deepEqual ( info . searchAttributes ! . CustomIntField , [ 1 ] ) ;
863
863
} ) ;
864
864
865
865
test ( 'continue-as-new-to-different-workflow can set memo and search attributes' , async ( t ) => {
@@ -873,7 +873,7 @@ export function runIntegrationTests(codec?: PayloadCodec): void {
873
873
} ,
874
874
searchAttributes : {
875
875
CustomKeywordField : [ 'test-value-2' ] ,
876
- CustomIntField : [ 3 , 4 ] ,
876
+ CustomIntField : [ 3 ] ,
877
877
} ,
878
878
} ,
879
879
] ,
@@ -885,7 +885,7 @@ export function runIntegrationTests(codec?: PayloadCodec): void {
885
885
} ,
886
886
searchAttributes : {
887
887
CustomKeywordField : [ 'test-value' ] ,
888
- CustomIntField : [ 1 , 2 ] ,
888
+ CustomIntField : [ 1 ] ,
889
889
} ,
890
890
} ) ;
891
891
await workflow . result ( ) ;
@@ -894,7 +894,7 @@ export function runIntegrationTests(codec?: PayloadCodec): void {
894
894
t . not ( info . runId , workflow . firstExecutionRunId ) ;
895
895
t . deepEqual ( info . memo , { note : 'bar' } ) ;
896
896
t . deepEqual ( info . searchAttributes ! . CustomKeywordField , [ 'test-value-2' ] ) ;
897
- t . deepEqual ( info . searchAttributes ! . CustomIntField , [ 3 , 4 ] ) ;
897
+ t . deepEqual ( info . searchAttributes ! . CustomIntField , [ 3 ] ) ;
898
898
} ) ;
899
899
900
900
test ( 'signalWithStart works as intended and returns correct runId' , async ( t ) => {
@@ -1259,7 +1259,9 @@ export function runIntegrationTests(codec?: PayloadCodec): void {
1259
1259
const stacks = enhancedStack . stacks . map ( ( s ) => ( {
1260
1260
locations : s . locations . map ( ( l ) => ( {
1261
1261
...l ,
1262
- ...( l . filePath ? { filePath : l . filePath . replace ( path . resolve ( __dirname , '../../../' ) , '' ) } : undefined ) ,
1262
+ ...( l . filePath
1263
+ ? { filePath : l . filePath . replace ( path . resolve ( __dirname , '../../../' ) , '' ) . replace ( / \\ / g, '/' ) }
1264
+ : undefined ) ,
1263
1265
} ) ) ,
1264
1266
} ) ) ;
1265
1267
t . is ( enhancedStack . sdk . name , 'typescript' ) ;
@@ -1341,40 +1343,45 @@ export function runIntegrationTests(codec?: PayloadCodec): void {
1341
1343
1342
1344
/**
1343
1345
* NOTE: this test uses the `IN` operator API which requires advanced visibility as of server 1.18.
1344
- * Run with docker-compose
1346
+ * It will silently succeed on servers that only support standard visibility (can't dynamically skip a test).
1345
1347
*/
1346
1348
test ( 'Download and replay multiple executions with client list method' , async ( t ) => {
1347
- const { metaClient : client } = t . context ;
1348
- const taskQueue = 'test' ;
1349
- const fns = [
1350
- workflows . http ,
1351
- workflows . cancelFakeProgress ,
1352
- workflows . childWorkflowInvoke ,
1353
- workflows . activityFailures ,
1354
- ] ;
1355
- const handles = await Promise . all (
1356
- fns . map ( ( fn ) =>
1357
- client . workflow . start ( fn , {
1358
- taskQueue,
1359
- workflowId : uuid4 ( ) ,
1360
- } )
1361
- )
1362
- ) ;
1363
- // Wait for the workflows to complete first
1364
- await Promise . all ( handles . map ( ( h ) => h . result ( ) ) ) ;
1365
- // Test the list API too while we're at it
1366
- const workflowIds = handles . map ( ( { workflowId } ) => `'${ workflowId } '` ) ;
1367
- const histories = client . workflow . list ( { query : `WorkflowId IN (${ workflowIds . join ( ', ' ) } )` } ) . intoHistories ( ) ;
1368
- const results = Worker . runReplayHistories (
1369
- {
1370
- workflowsPath : require . resolve ( './workflows' ) ,
1371
- dataConverter : t . context . dataConverter ,
1372
- } ,
1373
- histories
1374
- ) ;
1349
+ try {
1350
+ const { metaClient : client } = t . context ;
1351
+ const taskQueue = 'test' ;
1352
+ const fns = [
1353
+ workflows . http ,
1354
+ workflows . cancelFakeProgress ,
1355
+ workflows . childWorkflowInvoke ,
1356
+ workflows . activityFailures ,
1357
+ ] ;
1358
+ const handles = await Promise . all (
1359
+ fns . map ( ( fn ) =>
1360
+ client . workflow . start ( fn , {
1361
+ taskQueue,
1362
+ workflowId : uuid4 ( ) ,
1363
+ } )
1364
+ )
1365
+ ) ;
1366
+ // Wait for the workflows to complete first
1367
+ await Promise . all ( handles . map ( ( h ) => h . result ( ) ) ) ;
1368
+ // Test the list API too while we're at it
1369
+ const workflowIds = handles . map ( ( { workflowId } ) => `'${ workflowId } '` ) ;
1370
+ const histories = client . workflow . list ( { query : `WorkflowId IN (${ workflowIds . join ( ', ' ) } )` } ) . intoHistories ( ) ;
1371
+ const results = await Worker . runReplayHistories (
1372
+ {
1373
+ workflowsPath : require . resolve ( './workflows' ) ,
1374
+ dataConverter : t . context . dataConverter ,
1375
+ } ,
1376
+ histories
1377
+ ) ;
1375
1378
1376
- for await ( const result of results ) {
1377
- t . is ( result . error , undefined ) ;
1379
+ for await ( const result of results ) {
1380
+ t . is ( result . error , undefined ) ;
1381
+ }
1382
+ } catch ( e ) {
1383
+ // Don't report a test failure if the server does not support extended query
1384
+ if ( ! ( e as Error ) . message ?. includes ( `operator 'in' not allowed` ) ) throw e ;
1378
1385
}
1379
1386
t . pass ( ) ;
1380
1387
} ) ;
0 commit comments