@@ -25,7 +25,6 @@ groups() ->
25
25
[
26
26
{non_parallel_tests , [], [
27
27
file_handle_cache , % % Change FHC limit.
28
- file_handle_cache_reserve ,
29
28
file_handle_cache_reserve_release ,
30
29
file_handle_cache_reserve_monitor ,
31
30
file_handle_cache_reserve_open_file_above_limit
@@ -134,47 +133,6 @@ file_handle_cache1(_Config) ->
134
133
ok = file_handle_cache :set_limit (Limit ),
135
134
passed .
136
135
137
- file_handle_cache_reserve (Config ) ->
138
- passed = rabbit_ct_broker_helpers :rpc (Config , 0 ,
139
- ? MODULE , file_handle_cache_reserve1 , [Config ]).
140
-
141
- file_handle_cache_reserve1 (_Config ) ->
142
- Limit = file_handle_cache :get_limit (),
143
- ok = file_handle_cache :set_limit (5 ),
144
- % % Reserves are always accepted, even if above the limit
145
- % % These are for special processes such as quorum queues
146
- ok = file_handle_cache :set_reservation (7 ),
147
-
148
- Self = self (),
149
- spawn (fun () -> ok = file_handle_cache :obtain (),
150
- Self ! obtained
151
- end ),
152
-
153
- Props = file_handle_cache :info ([files_reserved , sockets_used ]),
154
- ? assertEqual (7 , proplists :get_value (files_reserved , Props )),
155
- ? assertEqual (0 , proplists :get_value (sockets_used , Props )),
156
-
157
- % % The obtain should still be blocked, as there are no file handles
158
- % % available
159
- receive
160
- obtained ->
161
- throw (error_file_obtained )
162
- after 1000 ->
163
- % % Let's release 5 file handles, that should leave
164
- % % enough free for the `obtain` to go through
165
- file_handle_cache :set_reservation (2 ),
166
- Props0 = file_handle_cache :info ([files_reserved , sockets_used ]),
167
- ? assertEqual (2 , proplists :get_value (files_reserved , Props0 )),
168
- ? assertEqual (1 , proplists :get_value (sockets_used , Props0 )),
169
- receive
170
- obtained ->
171
- ok = file_handle_cache :set_limit (Limit ),
172
- passed
173
- after 5000 ->
174
- throw (error_file_not_released )
175
- end
176
- end .
177
-
178
136
file_handle_cache_reserve_release (Config ) ->
179
137
passed = rabbit_ct_broker_helpers :rpc (Config , 0 ,
180
138
? MODULE , file_handle_cache_reserve_release1 , [Config ]).
0 commit comments