=== Test case: mongoose_lazy_routing_SUITE:can_register_and_unregister_iq_handler_for_two_domains/1 (click for source code)

=== Config value:

    [{watchdog,<0.84561.0>},
     {tc_logfile,"/home/circleci/project/_build/test/logs/ct_run.mongooseim@localhost.2024-04-12_07.06.34/lib.mongooseim.logs/run.2024-04-12_07.06.35/mongoose_lazy_routing_suite.can_register_and_unregister_iq_handler_for_two_domains.html"},
     {tc_group_properties,[{suite,mongoose_lazy_routing_SUITE}]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/_build/test/lib/mongooseim/test/mongoose_lazy_routing_SUITE_data/"},
     {priv_dir,"/home/circleci/project/_build/test/logs/ct_run.mongooseim@localhost.2024-04-12_07.06.34/lib.mongooseim.logs/run.2024-04-12_07.06.35/log_private/"}]

=== Current directory is "/home/circleci/project/_build/test/logs/ct_run.mongooseim@localhost.2024-04-12_07.06.34"

=== Started at 2024-04-12 07:10:39


*** System report during mongoose_lazy_routing_SUITE:can_register_and_unregister_iq_handler_for_two_domains/1 2024-04-12 07:10:40.963 ***🔗
=ERROR REPORT==== 12-Apr-2024::07:10:40.963228 ===
** Generic server mongoose_lazy_routing terminating 
** Last message in was {'$gen_cast',
                        {maybe_remove_subdomain,
                         #{host_type => <<"host type #2">>,
                           parent_domain => <<"domain2.test">>,
                           subdomain_pattern => {prefix,<<"sub.">>},
                           subdomain => <<"sub.domain2.test">>,
                           packet_handler =>
                            {packet_handler,
                             fun packet_handler_2:process_packet/5,
                             #{host_type => <<"host type #2">>}}}}}
** When Server state == ok
** Reason for termination ==
** {badarg,
       [{ets,delete,
            [mongoose_router,<<"sub.domain2.test">>],
            [{error_info,#{cause => id,module => erl_stdlib_errors}}]},
        {mongoose_router,unregister_route,1,
            [{file,"/home/circleci/project/src/mongoose_router.erl"},
             {line,37}]},
        {mongoose_lazy_routing_meck_original,handle_maybe_remove_subdomain,1,
            [{file,
                 "/home/circleci/project/src/domain/mongoose_lazy_routing.erl"},
             {line,361}]},
        {mongoose_lazy_routing_meck_original,handle_cast,2,
            [{file,
                 "/home/circleci/project/src/domain/mongoose_lazy_routing.erl"},
             {line,180}]},
        {gen_server,try_handle_cast,3,[{file,"gen_server.erl"},{line,1121}]},
        {gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,1183}]},
        {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,241}]},
        {mongoose_lazy_routing,handle_cast,
            [{maybe_remove_subdomain,
                 #{host_type => <<"host type #2">>,
                   parent_domain => <<"domain2.test">>,
                   subdomain_pattern => {prefix,<<"sub.">>},
                   subdomain => <<"sub.domain2.test">>,
                   packet_handler =>
                       {packet_handler,fun packet_handler_2:process_packet/5,
                           #{host_type => <<"host type #2">>}}}},
             ok],
            []}]}



*** System report during mongoose_lazy_routing_SUITE:can_register_and_unregister_iq_handler_for_two_domains/1 2024-04-12 07:10:41.035 ***🔗
=CRASH REPORT==== 12-Apr-2024::07:10:40.963688 ===
  crasher:
    initial call: mongoose_lazy_routing:init/1
    pid: <0.84858.0>
    registered_name: mongoose_lazy_routing
    exception error: bad argument
      in function  ets:delete/2
         called as ets:delete(mongoose_router,<<"sub.domain2.test">>)
         *** argument 1: the table identifier does not refer to an existing ETS table
      in call from mongoose_router:unregister_route/1 (/home/circleci/project/src/mongoose_router.erl, line 37)
      in call from mongoose_lazy_routing_meck_original:handle_maybe_remove_subdomain/1 (/home/circleci/project/src/domain/mongoose_lazy_routing.erl, line 361)
      in call from mongoose_lazy_routing_meck_original:handle_cast/2 (/home/circleci/project/src/domain/mongoose_lazy_routing.erl, line 180)
      in call from gen_server:try_handle_cast/3 (gen_server.erl, line 1121)
      in call from gen_server:handle_msg/6 (gen_server.erl, line 1183)
      in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 241)
      in call from mongoose_lazy_routing:handle_cast/2
         called as mongoose_lazy_routing:handle_cast({maybe_remove_subdomain,
                                                      #{host_type =>
                                                         <<"host type #2">>,
                                                        parent_domain =>
                                                         <<"domain2.test">>,
                                                        subdomain_pattern =>
                                                         {prefix,<<"sub.">>},
                                                        subdomain =>
                                                         <<"sub.domain2.test">>,
                                                        packet_handler =>
                                                         {packet_handler,
                                                          fun packet_handler_2:process_packet/5,
                                                          #{host_type =>
                                                             <<"host type #2">>}}}},
                                                     ok)
    ancestors: [<0.84856.0>]
    message_queue_len: 0
    messages: []
    links: [<0.84856.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 1598
    stack_size: 28
    reductions: 3292
  neighbours:
    neighbour:
      pid: <0.84857.0>
      registered_name: []
      initial_call: {test_server_sup,timetrap,4}
      current_function: {test_server_sup,timetrap,4}
      ancestors: []
      message_queue_len: 0
      links: [<0.84856.0>]
      trap_exit: false
      status: waiting
      heap_size: 233
      stack_size: 5
      reductions: 170
      current_stacktrace: [{test_server_sup,timetrap,4,
                                   [{file,"test_server_sup.erl"},{line,63}]}]
    neighbour:
      pid: <0.84856.0>
      registered_name: []
      initial_call: {erlang,apply,2}
      current_function: {gen,do_call,4}
      ancestors: []
      message_queue_len: 0
      links: [<0.84857.0>,<0.84858.0>,<0.69686.0>]
      trap_exit: false
      status: waiting
      heap_size: 2586
      stack_size: 54
      reductions: 6585
      current_stacktrace: [{gen,do_call,4,[{file,"gen.erl"},{line,259}]},
                  {gen_server,call,2,[{file,"gen_server.erl"},{line,400}]},
                  {meck_proc,gen_server,3,
                      [{file,
                           "/home/circleci/project/_build/default/lib/meck/src/meck_proc.erl"},
                       {line,490}]},
                  {meck,unload,1,
                      [{file,
                           "/home/circleci/project/_build/default/lib/meck/src/meck.erl"},
                       {line,484}]},
                  {meck,'-unload/0-fun-0-',2,
                      [{file,
                           "/home/circleci/project/_build/default/lib/meck/src/meck.erl"},
                       {line,467}]},
                  {lists,foldl_1,3,[{file,"lists.erl"},{line,1599}]},
                  {mongoose_lazy_routing_SUITE,end_per_testcase,2,
                      [{file,
                           "/home/circleci/project/test/mongoose_lazy_routing_SUITE.erl"},
                       {line,55}]},
                  {test_server,do_end_per_testcase,4,
                      [{file,"test_server.erl"},{line,1637}]},
                  {test_server,run_test_case_eval1,6,
                      [{file,"test_server.erl"},{line,1345}]},
                  {test_server,run_test_case_eval,9,
                      [{file,"test_server.erl"},{line,1234}]}]

=== WARNING! mongoose_lazy_routing_SUITE:end_per_testcase(can_register_and_unregister_iq_handler_for_two_domains, [{tc_status,
                                                                                                                ok},
                                                                                                               {watchdog,
                                                                                                                <0.84857.0>},
                                                                                                               {tc_logfile,
                                                                                                                "/home/circleci/project/_build/test/logs/ct_run.mongooseim@localhost.2024-04-12_07.06.34/lib.mongooseim.logs/run.2024-04-12_07.06.35/mongoose_lazy_routing_suite.can_register_and_unregister_iq_handler_for_two_domains.html"},
                                                                                                               {tc_group_properties,
                                                                                                                [{suite,
                                                                                                                  mongoose_lazy_routing_SUITE}]},
                                                                                                               {tc_group_path,
                                                                                                                []},
                                                                                                               {data_dir,
                                                                                                                "/home/circleci/project/_build/test/lib/mongooseim/test/mongoose_lazy_routing_SUITE_data/"},
                                                                                                               {priv_dir,
                                                                                                                "/home/circleci/project/_build/test/logs/ct_run.mongooseim@localhost.2024-04-12_07.06.34/lib.mongooseim.logs/run.2024-04-12_07.06.35/log_private/"}]) failed!
	Reason: {'EXIT',
                    {badarg,
                        {ets,delete,
                            [mongoose_router,<<"sub.domain2.test">>],
                            [{error_info,
                                 #{cause => id,
                                   module => erl_stdlib_errors}}]}}}




=== Ended at 2024-04-12 07:10:41
=== successfully completed test case
=== === Returned value: ok


Test run history | Top level test index | Latest test result