Commit Graph

40 Commits

Author SHA1 Message Date
Zaiming (Stone) Shi 14ba75502f chore: update copyright year 2023-01-02 14:54:38 +01:00
Zaiming (Stone) Shi 2662c52a88 chore: sync test/emqx_client_SUITE.erl from ee to ce 2022-12-28 14:37:23 +01:00
zhongwencool 761436c967 fix: don't allow empty username if username_as_clientid is true 2022-05-05 10:50:53 +08:00
JimMoen 6168745f90 chore: update copyright 2022-04-14 11:23:25 +08:00
Zaiming Shi 6354e75626 chore: update copyrights 2021-04-23 20:43:00 +02:00
Jóvan S. Dippenaar 6541c589ab test(tls1.3): Tests for default ssl config, as well as specific tls versions ( 1.1, 1.2, 1.3 ) 2021-02-05 16:21:28 +13:00
Zaiming Shi d67212e7fa chore(test): Make test profile build 2020-12-11 08:19:26 +01:00
tigercl 7a0ad0f8af
Update certs (#3447)
* Update certs

* Update certs

* Fix test cases fail

Co-authored-by: turtleDeng <deng@emqx.io>
2020-05-12 10:37:26 +08:00
JianBo He 47720b906f Fix `peer_cert_as_username` option not working
see #3281
2020-03-05 15:55:39 +08:00
zhouzb 7ea75f4289 Update copyright 2020-01-03 18:31:08 +08:00
Feng Lee 9c3273a2c6 Improve the process of handling MQTT control packets (#3079) 2019-12-06 19:51:06 +08:00
turtled 13b625f729 Fix compile warning 2019-12-03 19:15:04 +08:00
terry-xiaoyu 7f730ffec6 Revert client_id options in the testcases 2019-10-12 18:05:34 +08:00
terry-xiaoyu 54e11d3bb5 Fix client_id options in testcases 2019-10-12 15:10:49 +08:00
Feng Lee 977b551bbf Fix the test cases for session, channel and connection modules 2019-09-29 10:53:59 +08:00
Feng Lee 8ab682151d Improve the connection and channel modules
- Rename the 'client_id' field to 'clientid'
- Support publish stats in channel module
- Update test cases for frame and channel modules
2019-09-29 10:22:02 +08:00
zhouzb e35eaa97b3 Fix test case 2019-09-16 17:36:22 +08:00
Feng Lee 7175e4a74c Set 'boot_modules' when starting emqx apps. 2019-09-06 17:36:34 +08:00
terry-xiaoyu 983973c841 Fix set_chan_stats incorrect 2019-09-05 15:59:18 +08:00
GilbertWong 3f20bcf58f Relace emqx_client with emqtt 2019-08-22 14:27:29 +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
周子博 85c33ce81f Fix test cases 2019-08-09 14:24:05 +08:00
GilbertWong 61ee889113 Fix client bug 2019-08-09 13:40:07 +08:00
Feng Lee a2d5b834da Improve emqx_pmon module and add more test cases 2019-08-08 22:42:45 +08:00
Feng Lee 4afa02ee48 Update all the test cases 2019-08-06 09:04:37 +08:00
Feng Lee c8317a230d Update copyright 2019-08-03 11:43:30 +08:00
Gilbert Wong b3927ff730 Add emqx_ct_helpers as deps and refactor test suites 2019-04-25 13:41:22 +08:00
Gilbert Wong d020ac0390 Delay receive waiting time 2019-03-18 14:20:52 +08:00
spring2maz 48450d1d37 Move request response out of emqx client (#2293)
* Delete response_topic_prefix

The Response-Infomation in CONNACK was misinterpreated, it should
not be a broker's global config, instead, it should be per-client
or even per-session prefix/suffix mechanism

* Delete request-response code from emqx_client

* Add request-response test code

* meck as default dependency --- temp workaround for dep-vsn-check
2019-03-13 11:27:25 +08:00
turtled 31e95b56c4 Update Copyright to 2019 2019-01-29 10:43:25 +08:00
YoukiLin 6b538d2363 Add test cases for 'emqx_cm' and 'emqx_sm' (#2073)
Add test cases for 'emqx_cm' and 'emqx_cn'
2018-12-20 21:03:40 +08:00
Gilbert Wong e0eb76afa6 Fix subscription 2018-12-08 16:09:54 +08:00
Gilbert 16821490ce Fix issue#1874 (#1964)
* Fix issue#1874
Prior to this change, if user use one client connect emqx with mqtt
v3.1.1, the client subscribe the topic and publish message to this
topic, it would receive this message itself published, this commit
provide a configure option to let user ignore the message itself published.

This change fix issue 1874.

* Small Fix

* Fix bug

* Better design

* Fix compile warning and improve coverage

* Better design to solve the performance issue

* Fix typo

* Fix typo

* Delete spaces in end of lines.

* Do not use anonymous function

* Better performance
2018-11-19 13:34:03 +08:00
terry-xiaoyu 997958aed1 Change the start_link API for emqx_client
Prior to this change, emqx_client:start_link does 2 works in one call:
- init an erlang process for emqx_client
- send MQTT CONNECT to remote broker

But this solution have some drawbacks:

- the return value of `start_link` compiles the return values of the 2
 works: {ok, Pid, MqttResult}. It is inconsistent with the return value
 of `gen_statem:start_link`, may causes confusions.

- the return mode of the 2 works are different:
  `start_link` should always return {ok, Pid} or {error, Reason}, but
 connecting to mqtt may throw out exceptions as it handles the
 socket. But the caller couldn't have thought of the exception, he would
 pattern match on the result of `emqx_client:start_link`, but it crashed!

- If the init work succeed but the connection failed, the caller couldn't
get a Pid from the return value, but indeed it was created inside the
emqx_client. This hides the fact that the Pid was created, and when the
Pid dies, the caller would receive an message from a Pid it doesn' know about.

This change divived these 2 work into 2 APIs:
- `start_link/1` is to build and verify the options, and returns {ok,Pid}
 (on success) or {error, Reason} (on failure).
- `connect/1` is to send MQTT CONNECT, and returns {ok, MQTTResult::properties()} or
 {error, MQTTReason}. MQTT reason codes will contains in the `MQTTReason`.
2018-11-09 17:43:04 +08:00
Gilbert 4c40f75f4b Request & Response (broker and client) (#1819)
Add request & response support for CONNECT & CONNACK

Prior to this change, there is no validate and specified process for
Request-Response-Information and Response-Information

Also added basic Request/Response functionality to emqx_client implementation
2018-10-18 19:21:05 +02:00
Gilbert Wong 809c516a2b delete client testcases duplicated with emqx_mqtt_compat 2018-08-31 00:04:01 +08:00
HuangDan 18eee0f1b0 Fixed Conflicting files 2018-08-30 10:53:35 +08:00
HuangDan 0fbf813ebf Add mqtt connect tests cases 2018-08-30 10:35:04 +08:00
Feng Lee 41d1f04659 Update copyright 2018-08-28 20:37:46 +08:00
Feng Lee bffdd2ba74 Upgrade esockd and add more test cases 2018-05-22 13:01:19 +08:00