X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fipc.t;fp=t%2Fipc.t;h=7983fdc02ef1bcffcd479e860b2c92dd0c7c8dba;hb=708b182a57373172f5523f3dc297659d58e03b58;hp=ca88eb59d4ed8fe4dc16fcd2d24ea7c973e060c6;hpb=3060d78b4183f3e985fb7ff8864949de990f2610;p=public-inbox.git diff --git a/t/ipc.t b/t/ipc.t index ca88eb59..7983fdc0 100644 --- a/t/ipc.t +++ b/t/ipc.t @@ -122,11 +122,16 @@ for my $t ('local', 'worker', 'worker again') { $ipc->wq_io_do('test_sha', [ $wa, $wb ], 'hello world'); is(readline($rb), sha1_hex('hello world')."\n", "SHA small ($t)"); { - my $bigger = $big x 10; + my $bigger = $big x 10; # to hit EMSGSIZE $ipc->wq_io_do('test_sha', [ $wa, $wb ], $bigger); my $exp = sha1_hex($bigger)."\n"; - undef $bigger; - is(readline($rb), $exp, "SHA big ($t)"); + is(readline($rb), $exp, "SHA big for EMSGSIZE ($t)"); + + # to hit the WQWorker recv_and_run length + substr($bigger, my $MY_MAX_ARG_STRLEN = 4096 * 33, -1) = ''; + $ipc->wq_io_do('test_sha', [ $wa, $wb ], $bigger); + $exp = sha1_hex($bigger)."\n"; + is(readline($rb), $exp, "SHA WQWorker limit ($t)"); } my $ppid = $ipc->wq_workers_start('wq', 1); push(@ppids, $ppid);