Skip to content

Commit

Permalink
Kill processes in the functional test, and make sure that closed
Browse files Browse the repository at this point in the history
websocket result in killed processes.
  • Loading branch information
ahyatt committed Sep 2, 2012
1 parent d29b171 commit 0efcdfe
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions websocket-functional-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
(assert (null (websocket-openp wstest-ws)))

(stop-process wstest-server-proc)
(kill-process wstest-server-proc)

;; Make sure the processes are closed. This happens asynchronously,
;; so let's wait for it.
(sleep-for 1)
(assert (null (process-list)) t)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Remote server test, with wss ;;
Expand Down Expand Up @@ -116,4 +122,8 @@
(assert (equal (car wstest-msgs) "Hi to self!"))
(websocket-server-close server-conn)
(assert wstest-closed)
(websocket-close wstest-ws)

(sleep-for 1)
(assert (null (process-list)) t)
(message "\nAll tests passed!\n")

0 comments on commit 0efcdfe

Please sign in to comment.