Skip to content

Commit

Permalink
test(lb-mode): add test for lb-mode-ifip
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhuyan committed Sep 19, 2024
1 parent db7f354 commit 8a11b02
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/quicer_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
tc_lib_registration_1/1,
tc_lib_re_registration/1,
tc_lib_registration_neg/1,
tc_setopt_global_lb_mode_ifip/1,
tc_open_listener_inval_reg/1,

tc_stream_client_init/1,
Expand Down Expand Up @@ -3081,6 +3082,19 @@ tc_stream_get_owner_remote(Config) ->
SPid ! done,
ensure_server_exit_normal(Ref).

tc_setopt_global_lb_mode_ifip(_Config) ->
{ok, _} = application:ensure_all_started(quicer),
true = code:soft_purge(quicer_nif),
true = code:delete(quicer_nif),
application:set_env(quicer, lb_mode, ?QUICER_LOAD_BALANCING_IFIP_AS_SERVER_ID),
%% If test fail ensure we have this netdev `lo'
application:set_env(quicer, lb_dev, "lo"),
quicer:reg_close(),
quicer:close_lib(),
{ok, _} = quicer:open_lib(),
?assertEqual({ok, 2},
quicer:getopt(quic_global, load_balacing_mode)).

%%% ====================
%%% Internal helpers
%%% ====================
Expand Down

0 comments on commit 8a11b02

Please sign in to comment.