instedd / surveda

InSTEDD Surveda
https://instedd.org/technologies/surveda-mobile-surveys/
GNU General Public License v3.0
16 stars 6 forks source link

[workaround] Skip canceller tests #2348

Closed anaPerezGhiglia closed 3 weeks ago

anaPerezGhiglia commented 3 weeks ago

However, there seems to be something odd with the canceller since the tests print these non-test-breaking errors

It seems that we are missing a handle_cast implementation on it. Were these errors always there and we never noticed them? 🤔

2024-06-10T18:10:43.356Z [error] GenServer #PID<0.554.0> terminating
** (FunctionClauseError) no function clause matching in Ecto.Changeset.cast/4
    (ecto 3.9.4) lib/ecto/changeset.ex:497: Ecto.Changeset.cast(nil, %{state: "terminated"}, [:name, :description, :project_id, :folder_id, :mode, :state, :locked, :exit_code, :exit_message, :cutoff, :schedule, :sms_retry_configuration, :ivr_retry_configuration, :mobileweb_retry_configuration, :fallback_delay, :started_at, :quotas, :quota_vars, :comparisons, :count_partial_results, :simulation, :ended_at, :incentives_enabled, :first_window_started_at, :last_window_ends_at, :panel_survey_id, :generates_panel_survey], [])
    (ask 0.31.0) lib/ask/survey.ex:139: Ask.Survey.changeset/2
    (ask 0.31.0) lib/ask/runtime/survey_canceller.ex:44: Ask.Runtime.SurveyCanceller.terminate_survey/1
    (ask 0.31.0) lib/ask/runtime/survey_canceller.ex:83: Ask.Runtime.SurveyCanceller.handle_info/2
    (stdlib 3.12.1.2) gen_server.erl:637: :gen_server.try_dispatch/4
    (stdlib 3.12.1.2) gen_server.erl:711: :gen_server.handle_msg/6
    (stdlib 3.12.1.2) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: :cancel