|
33 | 33 | all() -> |
34 | 34 | [ |
35 | 35 | no_request_in_worker_queue_is_lost_when_amqp_call_fails, |
36 | | - worker_creates_fresh_amqp_conection_and_channel_when_amqp_call_fails, |
37 | | - worker_processes_msgs_when_queue_msg_len_limit_is_not_reached, |
38 | | - worker_drops_msgs_when_queue_msg_len_limit_is_reached |
| 36 | + worker_creates_fresh_amqp_conection_and_channel_when_amqp_call_fails |
39 | 37 | ]. |
40 | 38 |
|
41 | 39 | %%-------------------------------------------------------------------- |
@@ -125,46 +123,6 @@ worker_creates_fresh_amqp_conection_and_channel_when_amqp_call_fails(Config) -> |
125 | 123 | ?assert(is_pid(Channel3)), |
126 | 124 | ?assertNotMatch(ConnectionAndChannel2, ConnectionAndChannel3). |
127 | 125 |
|
128 | | - |
129 | | -worker_processes_msgs_when_queue_msg_len_limit_is_not_reached(Config) -> |
130 | | - %% given |
131 | | - Worker = proplists:get_value(worker_pid, Config), |
132 | | - Ref = make_ref(), |
133 | | - Lock = lock_fun(), |
134 | | - SendBack = send_back_fun(), |
135 | | - |
136 | | - %% when |
137 | | - gen_server:cast(Worker, {amqp_publish, {Lock, [Ref]}, ok}), |
138 | | - gen_server:cast(Worker, {amqp_publish, {SendBack, [self(), Ref]}, ok}), |
139 | | - [gen_server:cast(Worker, {amqp_publish, ok, ok}) |
140 | | - || _ <- lists:seq(1, ?MAX_QUEUE_LEN-1)], |
141 | | - |
142 | | - %% unlock the worker |
143 | | - Worker ! Ref, |
144 | | - |
145 | | - %% then |
146 | | - ?assertReceivedMatch(Ref, 100). |
147 | | - |
148 | | -worker_drops_msgs_when_queue_msg_len_limit_is_reached(Config) -> |
149 | | - %% given |
150 | | - Worker = proplists:get_value(worker_pid, Config), |
151 | | - Ref = make_ref(), |
152 | | - Lock = lock_fun(), |
153 | | - SendBack = send_back_fun(), |
154 | | - |
155 | | - %% when |
156 | | - gen_server:cast(Worker, {amqp_publish, {Lock, [Ref]}, ok}), |
157 | | - gen_server:cast(Worker, {amqp_publish, {SendBack, [self(), Ref]}, ok}), |
158 | | - [gen_server:cast(Worker, {amqp_publish, ok, ok}) |
159 | | - || _ <- lists:seq(1, ?MAX_QUEUE_LEN+1)], |
160 | | - |
161 | | - %% unlock the worker |
162 | | - Worker ! Ref, |
163 | | - |
164 | | - %% then |
165 | | - ?assertError({assertReceivedMatch_failed, _}, |
166 | | - ?assertReceivedMatch(Ref, 100)). |
167 | | - |
168 | 126 | %%-------------------------------------------------------------------- |
169 | 127 | %% Helpers |
170 | 128 | %%-------------------------------------------------------------------- |
|
0 commit comments