Commit Graph

1668 Commits

Author SHA1 Message Date
zhouzb
7454e46934 Fix compile error 2019-08-22 16:59:13 +08:00
Feng Lee
8b03371a4a Improve the keepalive, connection, channel and session modules (#2813) 2019-08-22 16:38:25 +08:00
Mousse
bf942e4bec Handle the retained flag correctly (#2811)
Handle the retained flag correctly
2019-08-22 16:21:27 +08:00
tigercl
201428279b
Merge pull request #2817 from emqx/test_emqx_config
Remove redundant code and add test case
2019-08-22 16:13:50 +08:00
GilbertWong
3f20bcf58f Relace emqx_client with emqtt 2019-08-22 14:27:29 +08:00
zhouzb
94c56b5e31 Remove redundant code and add test case 2019-08-21 14:12:34 +08:00
tigercl
749ef823ab
Refix code about mqtt spec (#2806)
Refix code about mqtt spec
2019-08-19 10:50:52 +08:00
Feng Lee
f2b552e29e Ensure stats timer 2019-08-19 09:43:58 +08:00
Feng Lee
ae33b6037e Fix the test suites. 2019-08-17 14:39:04 +08:00
Feng Lee
52b2f31ced Merge branch 'improve-channel-design-again' into develop 2019-08-17 14:09:26 +08:00
Feng Lee
f26505d40a Implement session takeover and resumption.
- Implement session takeover
- Remove `init_proc_mng_policy/1' from emqx_misc module
- Remove `conn_proc_mng_policy/1' from emqx_misc module
- Add `emqx_oom' module to monitor OOM of channel process
2019-08-17 13:37:48 +08:00
tigercl
c1fd5f89f1 Make codes compliance with mqtt protocol specifications (#2790)
* Make codes compliance with mqtt protocol specifications

* Fix test case

* Remove emqx_protocol:puback/4
2019-08-17 09:15:43 +08:00
terry-xiaoyu
fa1adf5cfb Fix Message-Expiry-Interval not working 2019-08-16 18:27:22 +08:00
tigercl
2e26cd244a Improve test coverage (#2799)
* Improve test coverage

* Improve test coverage for emqx_cm

* Improve test coverage for emqx_cm_registry

* Fix emqx_client_SUITE
2019-08-16 18:25:49 +08:00
Feng Lee
d63eccd8b8 Add test cases for emqx_keepalive module (#2784)
* Improve the keepalive module
2019-08-16 18:24:39 +08:00
Gilbert
79744af681 Wrapper proper test cases into common test cases (#2785)
* Wrapper proper test cases into common test cases

* Improve test cases for reason code module (#2789)

* Split 3 proper tests into 3 ct cases

* Improve test cases for client, rpc and request-response

* Add psk suites to increase coverage

* Add sys test cases
2019-08-16 18:07:12 +08:00
JianBo He
8e401968f2 Add testcase for emqx_mod_sup 2019-08-16 17:48:37 +08:00
Shawn
b2ddcb26e2
Testcase logf (#2800)
* Add test cases for logger formatter

* Remove the unregister API
2019-08-16 15:11:38 +08:00
Feng Lee
444972968f Improve emqx_mqtt_props module and add test cases 2019-08-12 14:29:38 +08:00
周子博
c2cd43ee18 Fix attrs 2019-08-10 00:37:45 +08:00
terry-xiaoyu
0c24bfd78c Make emqx_tracer more reliable 2019-08-09 19:59:39 +08:00
周子博
f6d6f7f04d Fix test case 2019-08-09 19:45:43 +08:00
terry-xiaoyu
77616f4721 Add hook client.disconnected 2019-08-09 19:25:14 +08:00
terry-xiaoyu
a19777c2e6 Add hook message.acked 2019-08-09 19:12:56 +08:00
turtled
a93f8c6788 Fix auth fail 2019-08-09 17:37:55 +08:00
turtled
31cc446818 Mountpoint support %c and %u 2019-08-09 16:54:49 +08:00
turtled
91a8dbda56 Fix conflicts 2019-08-09 16:41:11 +08:00
周子博
d8bcb1b26f Don't check cpu util on Alpine that uses libc-musl 2019-08-09 16:10:30 +08:00
GilbertWong
6e0a269ff6 Wrap os:type for cpu:sup call 2019-08-09 16:04:38 +08:00
Feng Lee
439c481e35 Remove the trap_exit process_flag (#2737) 2019-08-09 16:02:50 +08:00
Shawn
68bf72ce04 Fix crashes when auth failed (#2736) 2019-08-09 16:02:04 +08:00
terry-xiaoyu
cca725db5f Add specs for emqx_logger 2019-08-09 15:47:20 +08:00
Feng Lee
3032731a2d Publish will msg when abnormal terminate 2019-08-09 15:28:47 +08:00
Feng Lee
03744ead30 Ensure the 'CONNACK' and 'DISCONNECT' packets delivered. 2019-08-09 15:09:17 +08:00
Feng Lee
52a85d9bb9 Export name/1 2019-08-09 15:09:17 +08:00
Feng Lee
a324965240 Add more test cases for emqx_protocol module 2019-08-09 14:29:49 +08:00
Gilbert
abb4b07665
Add session proper test cases (#2768)
* Add session proper test cases
* Remove useless mockers
2019-08-09 14:15:34 +08:00
GilbertWong
61ee889113 Fix client bug 2019-08-09 13:40:07 +08:00
Feng Lee
916afc1c74 Add test cases for emqx_protocol module
- Add emqx_session:info/2 for unit tests
- Add emqx_protocol:set/3 for unit tests
- Fix the `check_sub/3` of emqx_mqtt_caps
2019-08-09 11:33:52 +08:00
Feng Lee
a2d5b834da Improve emqx_pmon module and add more test cases 2019-08-08 22:42:45 +08:00
Feng Lee
6513a32d37
Merge pull request #2766 from emqx/improve-mqtt-caps-module
Improve mqtt caps module
2019-08-08 22:35:32 +08:00
Feng Lee
f70da696f0 Fix the badmatch error 2019-08-08 22:33:40 +08:00
GilbertWong
1707c7a7b7 Remove replayq from app.src list 2019-08-08 17:08:19 +08:00
周子博
0d65deb9d3 Fix not registering channels in time 2019-08-08 16:59:17 +08:00
Feng Lee
bd061415c9 Rewrite the emqx_mqtt_caps module and add test cases
- Rename `mqtt_retain_available` to `retain_available`
- Rename `mqtt_wildcard_subscription` to `wildcard_subscription`
- Rename `mqtt_shared_subscription` to `shared_subscription`
- Add `emqx_zone:unset_env/2` API for unit test
2019-08-08 14:11:26 +08:00
Feng Lee
bfd027cf8b Rewrite the mqtt_caps module 2019-08-07 14:01:50 +08:00
Gilbert
96b341fde5
Add proper tests for base62 (#2761)
* Add proper tests for base62

* Delete useless comment
2019-08-07 09:24:03 +08:00
Feng Lee
f60f127681 Improve the moudules and fix the bugs found in new test cases
- Fix the bug that emqx_mountpoint:unmount/2 will throw exception
- Add emqx_banned:info/1 for test cases
- Rename macro TRIE in emqx_trie module to TRIE_TAB
- Rename macro TRIE_NODE in emqx_trie module to TRIE_NODE_TAB
- Rename macro ROUTE in emqx_router module to ROUTE_TAB
2019-08-06 09:05:55 +08:00
Feng Lee
4afa02ee48 Update all the test cases 2019-08-06 09:04:37 +08:00
Feng Lee
f8e28e39ed Improve the channel modules and fix the extension mods 2019-08-02 18:04:38 +08:00
Feng Lee
32795321f5 Improve the rewrite mod using the new hooks 2019-08-02 11:14:42 +08:00
Feng Lee
cf9caf3c32 Add conn/0 type 2019-08-02 11:14:42 +08:00
Feng Lee
2fdda99d6d Improve the pipeline design of protocol and session 2019-08-02 11:14:42 +08:00
周子博
ef9cbe51eb Fix conflict 2019-08-02 10:41:46 +08:00
Feng Lee
c95a89ed1e Merge branch 'nchannel' into develop 2019-07-31 14:03:48 +08:00
Feng Lee
0a6468cf48 Introduce the 'pipeline' design pattern
- Introduce the 'pipeline' design pattern in emqx_protocol module
- Reame the '{dispatch, ...' to '{deliver, ...' in emqx_broker module
- Rename type 'credentials' to 'client'
2019-07-31 08:09:47 +08:00
Feng Lee
b32156bd68 Rename the type 'credentials' to 'client' 2019-07-31 08:08:11 +08:00
Feng Lee
41dfbd4165 Add 'packets.pubrec.inuse' counter 2019-07-30 19:12:42 +08:00
Feng Lee
c880668419 Register channel in this module 2019-07-30 19:11:21 +08:00
Feng Lee
51fb4e33d6 Rename 'Credentials' to 'Client' 2019-07-30 19:10:38 +08:00
terry-xiaoyu
20a7ed6f53 RPC batch 2019-07-29 09:35:06 +08:00
Feng Lee
c55ada3526 Improve the types 2019-07-27 23:24:38 +08:00
Feng Lee
d99c9daf76 Replace credentials with client 2019-07-27 23:22:02 +08:00
terry-xiaoyu
b0e2b7db0c Support inter-node messages via RPC cast 2019-07-27 12:59:07 +08:00
terry-xiaoyu
11fdf101f0 Configurable rpc client number 2019-07-26 15:13:58 +08:00
Feng Lee
32b2a01d68 Fix function_clause error and improve ws channel 2019-07-26 00:18:25 +08:00
Feng Lee
64148ac0e8 Improve the 'info/1', 'attrs/1' and 'stats/1' APIs 2019-07-25 09:26:36 +08:00
Feng Lee
b4a0a1c228 Fix whitespace 2019-07-25 09:26:02 +08:00
Feng Lee
5b3a61b799 Merge the connection and session tabs into channel tab 2019-07-25 09:25:45 +08:00
Feng Lee
a0a2375810 Update the .app file 2019-07-25 09:25:00 +08:00
Feng Lee
2de4bb0b8f Improve the channel modules and add 'attrs/1' API 2019-07-25 09:24:10 +08:00
Feng Lee
c091e89796 Remove the unnecessary include/emqx_client.hrl 2019-07-23 10:56:14 +08:00
Feng Lee
6b84eb0595 Rewrite the channel, protocol and session modules. 2019-07-22 17:08:53 +08:00
terry-xiaoyu
0569388f0f Fix websocket still send willmsg even after disconnect is received 2019-07-20 19:02:49 +08:00
terry-xiaoyu
4559b5023e Fix heartbeat interval 2019-07-20 16:20:53 +08:00
terry-xiaoyu
721e7c4804 Fix session termiated without ws_channel 2019-07-20 14:24:15 +08:00
terry-xiaoyu
0c54d899da Trap and handle exit in channel and ws_channel 2019-07-20 13:19:13 +08:00
Gilbert
05b660ff50 Unlink session when exit message has been forwarded to session (#2703)
* Unlink session when exit message has been forwarded to session

* Readjust possition of emqx_protocol:session
2019-07-20 13:05:34 +08:00
GilbertWong
eb68ce77b6 Fix the ws channel terminating crash when session pid is undefined 2019-07-19 17:36:50 +08:00
GilbertWong
391e39c3b6 Disable the useless error log info 2019-07-19 17:36:50 +08:00
GilbertWong
0c14484b0a Disable the useless error log info 2019-07-19 17:36:50 +08:00
GilbertWong
953d320667 Implement better websocket exit mechanism 2019-07-19 17:36:50 +08:00
terry-xiaoyu
86333802b9 Add configuration for sys_heartbeat 2019-07-19 17:33:24 +08:00
GilbertWong
4603ea17ef Better gen_rpc performance 2019-07-19 17:31:15 +08:00
GilbertWong
eb7ae13ae9 Better exit reason in websocket channel 2019-07-16 01:33:15 +08:00
GilbertWong
1fc0f61fbb Fix the websocket normal exit bug 2019-07-16 01:09:42 +08:00
Feng Lee
7b27d49a40 Add new metric 'channel.gc.cnt' 2019-07-14 08:59:38 +08:00
terry-xiaoyu
7472e531b1 Remove log handler for alarms 2019-07-11 13:27:03 +08:00
terry-xiaoyu
1bf68f4807 Change clear alarms to info log 2019-07-11 11:15:23 +08:00
GilbertWong
bf89646d93 Fix typo 2019-07-11 09:43:52 +08:00
GilbertWong
234037aee1 Fix will message mechanism for websocket channel 2019-07-11 09:43:52 +08:00
GilbertWong
c13e194838 Fix the check_subacl bug when enable_acl is set to false 2019-07-11 09:25:20 +08:00
terry-xiaoyu
5867b2e763 Fix idle_timeout crash 2019-07-11 09:17:23 +08:00
terry-xiaoyu
6ab9527603 Optimize to_map for performance 2019-07-05 23:14:27 +08:00
Gilbert
70be888f3b Compat windows (#2665) 2019-07-05 23:10:13 +08:00
周子博
61d64cbb83 Fix the issue that emqx_session:attrs/1 returns wrong value 2019-07-05 22:54:57 +08:00
Feng Lee
f4a753f683 Remove the debug print of batch deliver 2019-07-02 14:50:13 +08:00
Feng Lee
8c37ea3f38 Fix conflict 2019-07-02 14:02:42 +08:00
Feng Lee
42da51e1c5 Implement batch delivery for the new channel design
- Implement a new emqx_channel module
- Improve the emqx_frame:serialize/2 API
- Improve the emqx_connection, emqx_ws_connection modules
2019-07-02 13:40:52 +08:00
Feng Lee
177dc44155 Define 'Otherwise' macro 2019-07-02 13:39:23 +08:00