github.com/anycable/anycable-go@v1.5.1/features/ping.testfile (about) 1 launch :rpc, "bundle exec anyt --only-rpc" 2 wait_tcp 50051 3 4 launch :anycable, 5 "./dist/anycable-go --ping_interval=10" 6 wait_tcp 8080 7 8 scenario = [ 9 client: { 10 multiplier: 1, 11 connection_options: { 12 query: { 13 pi: "1" 14 } 15 }, 16 actions: [ 17 { 18 receive: { 19 "data>": { 20 type: "welcome" 21 } 22 } 23 }, 24 { 25 receive: { 26 "data>": { 27 type: "ping" 28 } 29 } 30 } 31 ] 32 } 33 ] 34 35 TEST_COMMAND = <<~CMD 36 bundle exec wsdirector ws://localhost:8080/cable -i #{scenario.to_json} 37 CMD 38 39 run :wsdirector, TEST_COMMAND 40 41 result = stdout(:wsdirector) 42 43 if result !~ /1 clients, 0 failures/ 44 fail "Unexpected scenario result:\n#{result}" 45 end