源码测试 1. ```git clone https://github.com/mpusher/mpush.git``` 2. 导入到eclipse或Intellij IDEA 3. 打开```mpush-test```模块,所有的测试代码都在该模块下 4. 如果没有安装```Redis```和```Zookeeper```,请修改如下几个类的注解为```@Spi(order = -1)``` ```java com.mpush.test.spi.SimpleCacheMangerFactory //模拟Redis com.mpush.test.spi.SimpleMQClientFactory //模拟MQ pub/sub com.mpush.test.spi.SimpleRegistryFactory //模拟ZK服务注册 com.mpush.test.spi.SimpleDiscoveryFactory //模拟ZK服务发现 ``` 5. 修改配置文件```src/test/resource/application.conf```文件修改方式参照[服务部署](http://mpush.mydoc.io?v=24639&t=134336)第6点 6. 运行```com.mpush.test.sever.ServerTestMain.java```启动长链接服务 7. 运行```com.mpush.test.client.ConnClientTestMain.java``` 模拟一个客户端 8. 运行```com.mpush.test.push.PushClientTestMain.java``` 模拟给用户下发消息 9. 可以在控制台观察日志看服务是否正常运行,消息是否下发成功 10. websocket 客户端测试地址 ```http://127.0.0.1:8080/index.html``` 11. alloc 启动入口 ```com.shinemo.mpush.alloc.AllocServerMainTest.java```