File tree Expand file tree Collapse file tree 8 files changed +91
-12
lines changed Expand file tree Collapse file tree 8 files changed +91
-12
lines changed Original file line number Diff line number Diff line change 1+ # 2.1.4
2+
3+ - Allow Ratchet/RFC6455 0.3
4+
5+ # 2.1.3
6+
7+ - Forward compatibility with voryx/event-loop 3.0 while supporting 2.0
8+
19# 2.1.2
210
311- Update deps
Original file line number Diff line number Diff line change 4040 "react/http" : " ^0.7.3 | ^0.8" ,
4141 "react/http-client" : " ^0.5.3" ,
4242 "voryx/event-loop" : " ^3.0 || ^2.0.2" ,
43- "ratchet/rfc6455" : " ^0.2.2" ,
43+ "ratchet/rfc6455" : " ^0.2.2 || ^0.3 " ,
4444 "reactivex/rxphp" : " ^2.0.1"
4545 },
4646 "require-dev" : {
Original file line number Diff line number Diff line change 77
88class TestCase extends FunctionalTestCase
99{
10- public function setup ()
10+ public function setup (): void
1111 {
1212 parent ::setup ();
1313
@@ -29,4 +29,4 @@ public static function resetScheduler()
2929 $ prop ->setAccessible (false );
3030 }
3131 }
32- }
32+ }
Original file line number Diff line number Diff line change 1212 $ reportUrl = "ws://127.0.0.1:9001/updateReports?agent= " . AGENT . "&shutdownOnComplete=true " ;
1313 $ client = new \Rx \Websocket \Client ($ reportUrl );
1414
15- $ client ->subscribe ();
15+ $ client ->subscribe (
16+ function (\Rx \Websocket \MessageSubject $ messages ) {
17+ echo "Report runner connected. \n" ;
18+ $ messages ->subscribe (new \Rx \Observer \CallbackObserver (
19+ function ($ x ) use ($ messages ) {
20+ echo "Message received by report runner connection: " . $ x . "\n" ;;
21+ },
22+ [$ messages , "onError " ],
23+ [$ messages , "onCompleted " ]
24+ ));
25+ },
26+ function (Throwable $ error ) {
27+ echo "Error on report runner connection: " . $ error ->getMessage () . "\n" ;
28+ echo "Seeing an error here might be normal. Network trace shows that AB fuzzingserver \n" ;
29+ echo "disconnects without sending an HTTP response. \n" ;
30+ },
31+ function () {
32+ echo "Report runner connection completed. \n" ;
33+ }
34+ );
1635};
1736
1837$ runIndividualTest = function ($ case , $ timeout = 60000 ) {
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -x
3+
4+ echo " Running $0 "
5+
6+ echo Adding " $1 host.ratchet.internal" to /etc/hosts file
7+
8+ echo $1 host.ratchet.internal >> /etc/hosts
9+
10+ echo /etc/hosts contains:
11+ cat /etc/hosts
12+ echo
Original file line number Diff line number Diff line change 44
55 "servers" : [
66 {"agent" : " RxWebsocketServer/0.0.0" ,
7- "url" : " ws://localhost :9001" ,
7+ "url" : " ws://host.ratchet.internal :9001" ,
88 "options" : {"version" : 18 }}
99 ],
1010 "cases" : [" *" ],
Original file line number Diff line number Diff line change 1- cd test/ab
1+ cd test/ab || exit
22
3- wstest -m fuzzingserver -s fuzzingserver.json &
3+ docker run --rm \
4+ -d \
5+ -v ${PWD} :/config \
6+ -v ${PWD} /reports:/reports \
7+ -p 9001:9001 \
8+ --name fuzzingserver \
9+ crossbario/autobahn-testsuite wstest -m fuzzingserver -s /config/fuzzingserver.json
410sleep 5
5- php clientRunner.php
11+
12+ php -d memory_limit=256M clientRunner.php
13+
14+ docker ps -a
15+
16+ docker logs fuzzingserver
17+
18+ docker stop fuzzingserver
619
720sleep 2
821
9- php testServer.php 600 &
22+
23+ php -d memory_limit=256M testServer.php &
24+ SERVER_PID=$!
1025sleep 3
11- wstest -m fuzzingclient -s fuzzingclient.json
12- sleep 12
26+
27+ if [ " $OSTYPE " = " linux-gnu" ]; then
28+ IPADDR=` hostname -I | cut -f 1 -d ' ' `
29+ else
30+ IPADDR=` ifconfig | grep " inet " | grep -Fv 127.0.0.1 | awk ' {print $2}' | head -1 | tr -d ' adr:' `
31+ fi
32+
33+ docker run --rm \
34+ -it \
35+ -v ${PWD} :/config \
36+ -v ${PWD} /reports:/reports \
37+ --name fuzzingclient \
38+ crossbario/autobahn-testsuite /bin/sh -c " sh /config/docker_bootstrap.sh $IPADDR ; wstest -m fuzzingclient -s /config/fuzzingclient.json"
39+ sleep 1
40+
41+ kill $SERVER_PID
42+
43+ # wstest -m fuzzingserver -s fuzzingserver.json &
44+ # sleep 5
45+ # php clientRunner.php
46+ #
47+ # sleep 2
48+
49+ # php testServer.php 600 &
50+ # sleep 3
51+ # wstest -m fuzzingclient -s fuzzingclient.json
52+ # sleep 12
Original file line number Diff line number Diff line change 1111 $ timerObservable = Observable::timer (1000 * $ argv [1 ]);
1212}
1313
14- $ server = new \Rx \Websocket \Server ("tcp://127 .0.0.1 :9001 " , true );
14+ $ server = new \Rx \Websocket \Server ("tcp://0 .0.0.0 :9001 " , true );
1515
1616$ server
1717 ->takeUntil ($ timerObservable )
You can’t perform that action at this time.
0 commit comments