main: add basic integration test

wait on #1315 
it tests if the server has been stopped, publish will return immediately. i want to make sure that there is no hanging publish goroutine if server is stopped..