test/debug/run_packet_push in ardtweeno-0.3.1 vs test/debug/run_packet_push in ardtweeno-0.4.0
- old
+ new
@@ -5,10 +5,10 @@
while true
key = "1230aea77d7bd38898fec74a75a87738dea9f657"
testData = {"data" => [rand(0..100)], "key" => "2dbf44a68b77b15bfa5bc3d66c97892a57402bbe"}.to_json
testData2 = {"data" => [rand(0..100), rand(0..1000)], "key" => "a46fe0c4dab0453f5d86bed6206040880f59393e"}.to_json
- puts Typhoeus::Request.post("http://192.168.1.8:4567/api/v1/packets", :body=> {:key => key, :payload=>testData})
- sleep(rand(0..90))
- #puts Typhoeus::Request.post("http://localhost:4567/api/v1/packets", :body=> {:key => key, :payload=>testData2})
- #sleep(rand(0.90))
+ puts Typhoeus::Request.post("http://localhost:4567/api/v1/packets", :body=> {:key => key, :payload=>testData})
+ sleep(rand(0..9))
+ puts Typhoeus::Request.post("http://localhost:4567/api/v1/packets", :body=> {:key => key, :payload=>testData2})
+ sleep(rand(0.9))
end