@@ -130,9 +130,7 @@ class ParamsOutTest extends Specification {
130130 process foo {
131131 output:
132132 val one into a
133- val two into p, q
134- file 'three' into b
135- file 'four' into x,y,z
133+ file 'two' into b
136134 return ''
137135 }
138136 '''
@@ -142,31 +140,17 @@ class ParamsOutTest extends Specification {
142140 when :
143141 def process = parseAndReturnProcess(text, binding)
144142 def out0 = (ValueOutParam )process. config. getOutputs(). get(0 )
145- def out1 = (ValueOutParam )process. config. getOutputs(). get(1 )
146- def out2 = (FileOutParam )process. config. getOutputs(). get(2 )
147- def out3 = (FileOutParam )process. config. getOutputs(). get(3 )
143+ def out1 = (FileOutParam )process. config. getOutputs(). get(1 )
148144
149145 then :
150- process. config. getOutputs(). size() == 4
146+ process. config. getOutputs(). size() == 2
151147
152148 out0. name == ' one'
153- out0. getOutChannels(). size()== 1
154- out0. getOutChannels(). get(0 ) instanceof DataflowQueue
155-
156- out1. name == ' two'
157- out1. getOutChannels(). size()== 2
158- out1. getOutChannels(). get(0 ) instanceof DataflowQueue
159- out1. getOutChannels(). get(1 ) instanceof DataflowQueue
149+ out0. getOutChannel() instanceof DataflowQueue
160150
161- out2. name == null
162- out2. getOutChannels(). size()== 1
163- out2. getOutChannels(). get(0 ) instanceof DataflowQueue
151+ out1. name == null
152+ out1. getOutChannel() instanceof DataflowQueue
164153
165- out3. name == null
166- out3. getOutChannels(). size()== 3
167- out3. getOutChannels(). get(0 ) instanceof DataflowQueue
168- out3. getOutChannels(). get(1 ) instanceof DataflowQueue
169- out3. getOutChannels(). get(2 ) instanceof DataflowQueue
170154 }
171155
172156 def testFileOutParams () {
@@ -366,30 +350,30 @@ class ParamsOutTest extends Specification {
366350 then :
367351 out0. name == ' x'
368352 out0. getFilePatterns(binding,null ) == [' hola' ]
369- out0. getOutChannels() . get( 0 ) instanceof DataflowQueue
370- out0. getOutChannels() . get( 0 ) == binding. x
353+ out0. getOutChannel( ) instanceof DataflowQueue
354+ out0. getOutChannel( ) == binding. x
371355
372356 out1. name == null
373357 out1. getFilePatterns(binding,null ) == [' hola_2' ]
374- out1. getOutChannels() . get( 0 ) instanceof DataflowQueue
375- out1. getOutChannels() . get( 0 ) == binding. q
358+ out1. getOutChannel( ) instanceof DataflowQueue
359+ out1. getOutChannel( ) == binding. q
376360
377361 out2. inner[0 ] instanceof FileOutParam
378362 (out2. inner[0 ] as FileOutParam ). name == ' z'
379363 (out2. inner[0 ] as FileOutParam ). getFilePatterns(binding,null ) == [' hola_z' ]
380364
381365 out3. name == ' u'
382366 out3. getFilePatterns(binding,null ) == [' u' ]
383- out3. getOutChannels() . get( 0 ) instanceof DataflowQueue
384- out3. getOutChannels() . get( 0 ) == binding. u
367+ out3. getOutChannel( ) instanceof DataflowQueue
368+ out3. getOutChannel( ) == binding. u
385369
386370 out4. name == null
387371 out4. getFilePatterns(binding,null ) == [' file_v' ]
388- out4. getOutChannels() . size() == 0
372+ out4. getOutChannel() == null
389373
390374 out5. name == null
391375 out5. getFilePatterns(binding,null ) == [' w' ]
392- out4. getOutChannels() . size() == 0
376+ out4. getOutChannel() == null
393377 }
394378
395379
@@ -523,17 +507,17 @@ class ParamsOutTest extends Specification {
523507 then :
524508 out0. name == null
525509 out0. getFilePatterns(binding,null ) == [' x' ]
526- out0. getOutChannels() . size() == 0
510+ ! out0. getOutChannel()
527511
528512 out1. name == ' y'
529513 out1. getFilePatterns(binding,null ) == [' y' ]
530- out1. getOutChannels() . get( 0 ) instanceof DataflowQueue
531- out1. getOutChannels() . get( 0 ) == binding. y
514+ out1. getOutChannel( ) instanceof DataflowQueue
515+ out1. getOutChannel( ) == binding. y
532516
533517 out2. name == null
534518 out2. getFilePatterns(binding,null ) == [' z' ]
535- out2. getOutChannels() . get( 0 ) instanceof DataflowQueue
536- out2. getOutChannels() . get( 0 ) == binding. channel_z
519+ out2. getOutChannel( ) instanceof DataflowQueue
520+ out2. getOutChannel( ) == binding. channel_z
537521 }
538522
539523
@@ -753,7 +737,7 @@ class ParamsOutTest extends Specification {
753737 process. config. getOutputs(). size() == 1
754738
755739 // first set
756- out0. getOutChannels() . size() == 0
740+ out0. getOutChannel() == null
757741
758742 out0. inner[0 ] instanceof ValueOutParam
759743 out0. inner[0 ]. name == ' X'
@@ -776,7 +760,6 @@ class ParamsOutTest extends Specification {
776760 output:
777761 stdout into p
778762 stdout into (q)
779- stdout into (x,y,z)
780763
781764 return ''
782765 }
@@ -788,16 +771,12 @@ class ParamsOutTest extends Specification {
788771 when :
789772 def out0 = (StdOutParam )process. config. getOutputs(). get(0 )
790773 def out1 = (StdOutParam )process. config. getOutputs(). get(1 )
791- def out2 = (StdOutParam )process. config. getOutputs(). get(2 )
792774
793775 then :
794- process. config. getOutputs(). size() == 3
776+ process. config. getOutputs(). size() == 2
795777
796- out0. getOutChannels()[0 ]. is binding. p
797- out1. getOutChannels()[0 ]. is binding. q
798- out2. getOutChannels()[0 ]. is binding. x
799- out2. getOutChannels()[1 ]. is binding. y
800- out2. getOutChannels()[2 ]. is binding. z
778+ out0. getOutChannel(). is binding. p
779+ out1. getOutChannel(). is binding. q
801780
802781 }
803782
@@ -948,20 +927,17 @@ class ParamsOutTest extends Specification {
948927
949928 out0. getName() == ' x'
950929 out0. getFilePattern() == null
951- out0. getOutChannels(). size()== 1
952- out0. getOutChannels(). get(0 ) instanceof DataflowQueue
930+ out0. getOutChannel() instanceof DataflowQueue
953931 out0. isPathQualifier()
954932
955933 out1. getName() == null
956934 out1. getFilePattern() == ' hello.*'
957- out1. getOutChannels(). size()== 1
958- out1. getOutChannels(). get(0 ) instanceof DataflowQueue
935+ out1. getOutChannel() instanceof DataflowQueue
959936 out1. isPathQualifier()
960937
961938 out2. getName() == null
962939 out2. getFilePattern() == ' hello.txt'
963- out2. getOutChannels(). size()== 1
964- out2. getOutChannels(). get(0 ) instanceof DataflowQueue
940+ out2. getOutChannel() instanceof DataflowQueue
965941 out2. isPathQualifier()
966942
967943 }
0 commit comments