diff --git a/runner/requester.go b/runner/requester.go index ee23772e..9838713d 100644 --- a/runner/requester.go +++ b/runner/requester.go @@ -401,9 +401,9 @@ func (b *Requester) makeServerStreamingRequest(ctx *context.Context, input *dyna func (b *Requester) makeBidiRequest(ctx *context.Context, input *[]*dynamic.Message) error { str, err := b.stub.InvokeRpcBidiStream(*ctx, b.mtd) if err != nil { - fmt.Printf("Stream creation failed: %+v\n", err) return err } + counter := 0 streamInput := *input @@ -420,12 +420,10 @@ func (b *Requester) makeBidiRequest(ctx *context.Context, input *[]*dynamic.Mess go func() { for { _, err := str.RecvMsg() - if err != nil && err != io.EOF { - fmt.Printf("error receiving: %+v\n", err) - } + if err != nil { close(recvDone) - return + break } } }() @@ -445,6 +443,7 @@ func (b *Requester) makeBidiRequest(ctx *context.Context, input *[]*dynamic.Mess wait = time.Tick(b.config.streamInterval) <-wait } + err = str.SendMsg(payload) counter++ } @@ -452,6 +451,7 @@ func (b *Requester) makeBidiRequest(ctx *context.Context, input *[]*dynamic.Mess if err == nil { <-recvDone } + return nil } diff --git a/testdata/localhost.crt b/testdata/localhost.crt index f3c8e91a..97ac9e34 100644 --- a/testdata/localhost.crt +++ b/testdata/localhost.crt @@ -1,18 +1,18 @@ -----BEGIN CERTIFICATE----- -MIIC5TCCAc2gAwIBAgIJAKXtGK2pKLIaMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV -BAMMCWxvY2FsaG9zdDAeFw0xOTAyMDMwMTE1MTJaFw0xOTAzMDUwMTE1MTJaMBQx +MIIC5TCCAc2gAwIBAgIJANAD3xBGYRogMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV +BAMMCWxvY2FsaG9zdDAeFw0xOTAzMjMyMDQxMTdaFw0xOTA0MjIyMDQxMTdaMBQx EjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBALl3DjXOySkzBaU8GUSyhUtHoklQaxq6rlyIMGvMB7fRPE793kWbtxZwe3a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mKbdQ/cbd1E9guxv59FfnsugS9GX/SMjI -HqaNeGC3spF8NbHzGDeI+YtvuLAsXdoKoQ== +AQsFAAOCAQEApghSG3N1fdQVGsoRii9b8mpsldOX0M5cZD2k4e4QKrIXAxyl7KDM +IqOi483NX1XEvBsvBGgNw4QO9koRagcf2oLjVmhSYOkj7qyU8P4AEcm7MnlTiHCL +eRmTxJvnQlDG8vVwzmi9UJm7JyR5en6PBnCt9SYHlakjtV1c4HJNIO2NLs5GukG4 +73xyhCcaazZVzJ7rX5VwnpjcwwNEOGLEZrS5gzUuaGX4AJYbeN5Wweqf6y2H4YqD +BVqB2ChJCOFtmu+49PN3xtdj04MCwMa6zmZSg1eqknkslxrZJuDGBEFCX9j8/XYo +7w+IT4Qgi31pqZMEKWWMymcdyDuW5U3EBA== -----END CERTIFICATE----- diff --git a/testdata/localhost.key b/testdata/localhost.key index 445fa27d..328c380a 100644 --- a/testdata/localhost.key +++ b/testdata/localhost.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC5dw41zskpMwWl -PBlEsoVLR6JJUGsauq5ciDBrzAe30TxO/d5Fm7cWcHt2gc7a6TJgi1g9wrXD6v1F -MVTBzZv/3XXfIX5QKNI1OG4a9ZFV71F0Jzb/WQoNmAHq6CFw90KCdFcao7tAm/Ot -Y5Tv5J4cZyZ5X+59skiUBwXIeHtgV2gh7/C4JdajaXpcks9m4k0Hy6iwEFMeBhGr -DeueqFsyzgtIFitbxS5FoZVj8y4coOoz8DshAuekrT+a8ycdARFaqZ3bhakX6xjp -Te22r3h6zRbNAoj8cCTRXXwxN0LjCdCFm5im+8TOqaK0m/97+MAqrDWgdA6lzVVr -QCj/pOAlAgMBAAECggEBAKOnoMxuSiemtCaYH5v1A5XoAhY7didB77YLHt8gTPcx -FMyHS+mUfDy6yNdLuCKHgEKc8yKcfBQDebXiz+2r5yoiW26neXR2cPcxckcrxjFU -W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