@@ -354,7 +354,7 @@ func testAll(t *testing.T, proto string, clientTp transport.ClientTransporter, s
354354 s .Complete ()
355355 })
356356 }),
357- RequestChannel (func (inputs flux.Flux ) flux.Flux {
357+ RequestChannel (func (initialRequest payload. Payload , inputs flux.Flux ) flux.Flux {
358358 received := new (int32 )
359359 inputs .
360360 DoOnNext (func (input payload.Payload ) error {
@@ -471,6 +471,7 @@ func testRequestStreamOneByOne(ctx context.Context, cli Client, t *testing.T) {
471471
472472func testRequestChannel (ctx context.Context , cli Client , t * testing.T ) {
473473 // RequestChannel
474+ initialPayload := payload .NewString ("This is a RequestChannel initial message." , "" )
474475 send := flux .Create (func (ctx context.Context , s flux.Sink ) {
475476 for i := 0 ; i < int (channelElements ); i ++ {
476477 s .Next (payload .NewString (fakeData , fmt .Sprintf ("%d" , i )))
@@ -480,7 +481,7 @@ func testRequestChannel(ctx context.Context, cli Client, t *testing.T) {
480481
481482 var seq int
482483
483- _ , err := cli .RequestChannel (send ).
484+ _ , err := cli .RequestChannel (initialPayload , send ).
484485 DoOnNext (func (elem payload.Payload ) error {
485486 //fmt.Println(elem)
486487 m , _ := elem .MetadataUTF8 ()
@@ -495,6 +496,7 @@ func testRequestChannel(ctx context.Context, cli Client, t *testing.T) {
495496
496497func testRequestChannelOneByOne (ctx context.Context , cli Client , t * testing.T ) {
497498 // RequestChannel
499+ initialPayload := payload .NewString ("This is a RequestChannel initial message." , "" )
498500 send := flux .Create (func (ctx context.Context , s flux.Sink ) {
499501 for i := 0 ; i < int (channelElements ); i ++ {
500502 s .Next (payload .NewString (fakeData , fmt .Sprintf ("%d" , i )))
@@ -508,7 +510,7 @@ func testRequestChannelOneByOne(ctx context.Context, cli Client, t *testing.T) {
508510
509511 var su rx.Subscription
510512
511- cli .RequestChannel (send ).
513+ cli .RequestChannel (initialPayload , send ).
512514 DoFinally (func (s rx.SignalType ) {
513515 assert .Equal (t , rx .SignalComplete , s , "bad signal type" )
514516 close (done )
@@ -599,7 +601,7 @@ func (d delayedRSocket) RequestStream(message payload.Payload) flux.Flux {
599601 panic ("implement me" )
600602}
601603
602- func (d delayedRSocket ) RequestChannel (messages flux.Flux ) flux.Flux {
604+ func (d delayedRSocket ) RequestChannel (initialRequest payload. Payload , messages flux.Flux ) flux.Flux {
603605 panic ("implement me" )
604606}
605607
0 commit comments