fix: two test issues causing 37 failures
Some checks failed
Build and Push / Build and Push Docker Image (push) Failing after 39s
Some checks failed
Build and Push / Build and Push Docker Image (push) Failing after 39s
1. RoverPathProfileWorker sandbox ownership: fallback_hits/2 used Task.async_stream spawning separate DB-querying processes that lacked Ecto sandbox ownership in test mode. Replaced with sequential Enum.map since miss list is ≤9 points — no meaningful perf impact and eliminates the sandbox race entirely. 2. PSKR client test: asserted '6m' band in defaults, but the actual microwave band name is '6cm'. Fixed assertion.
This commit is contained in:
parent
ca842e3add
commit
51678e0fb9
2 changed files with 3 additions and 21 deletions
|
|
@ -200,26 +200,8 @@ defmodule Microwaveprop.Propagation.PathCompute do
|
|||
defp fallback_hits(misses, now) do
|
||||
misses
|
||||
|> Enum.reverse()
|
||||
|> Task.async_stream(&fallback_hrrr_point(&1, now),
|
||||
max_concurrency: 4,
|
||||
timeout: 5_000,
|
||||
on_timeout: :kill_task
|
||||
)
|
||||
|> Enum.zip(Enum.reverse(misses))
|
||||
|> Enum.flat_map(fn
|
||||
{{:ok, nil}, _} ->
|
||||
[]
|
||||
|
||||
{{:ok, point}, _} ->
|
||||
[point]
|
||||
|
||||
{{:exit, reason}, {label, lat, lon}} ->
|
||||
Logger.error(
|
||||
"PathCompute HRRR fallback lookup failed: label=#{inspect(label)} lat=#{lat} lon=#{lon} reason=#{inspect(reason)}"
|
||||
)
|
||||
|
||||
[]
|
||||
end)
|
||||
|> Enum.map(&fallback_hrrr_point(&1, now))
|
||||
|> Enum.filter(& &1)
|
||||
end
|
||||
|
||||
@doc "Public for PathLive's `path_forecast_detail` event."
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ defmodule Microwaveprop.Pskr.ClientTest do
|
|||
pid = start_supervised!({Client, []})
|
||||
state = :sys.get_state(pid)
|
||||
|
||||
assert "6m" in state.bands
|
||||
assert "6cm" in state.bands
|
||||
assert "2m" in state.bands
|
||||
assert "70cm" in state.bands
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue