Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/membrane/core/pipeline_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ defmodule Membrane.Core.PipelineTest do
end

test "should raise if trying to spawn element with already taken name", %{state: state} do
state = %State{state | children: %{a: %{group: nil, name: :a}}}
state = %{state | children: %{a: %{group: nil, name: :a}}}

assert_raise Membrane.ParentError, ~r/.*duplicate.*\[:a\]/i, fn ->
ActionHandler.handle_action(
Expand All @@ -97,7 +97,7 @@ defmodule Membrane.Core.PipelineTest do
end

test "notification handling", %{state: state} do
state = %State{state | children: %{source: %{}}}
state = %{state | children: %{source: %{}}}
notification = Message.new(:child_notification, [:source, :abc])
assert {:noreply, state} = @module.handle_info(notification, state)
assert %{internal_state: %{child_notification: {:abc, :source}}} = state
Expand All @@ -110,7 +110,7 @@ defmodule Membrane.Core.PipelineTest do
end

test "other messages handling", %{state: state} do
state = %State{state | children: %{source: %{}}}
state = %{state | children: %{source: %{}}}
assert {:noreply, state} = @module.handle_info(:other_message, state)
assert %{internal_state: %{other: :other_message}} = state
end
Expand Down
7 changes: 3 additions & 4 deletions test/membrane/integration/auto_demands_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,9 @@ defmodule Membrane.Integration.AutoDemandsTest do
Enum.flat_map(payloads, &Enum.map(1..Integer.pow(factor, filters), fn _i -> &1 end))

{in_payloads, out_payloads} =
case direction do
:up -> {payloads, mult_payloads}
:down -> {mult_payloads, payloads}
end
if direction == :up,
do: {payloads, mult_payloads},
else: {mult_payloads, payloads}
Comment on lines -91 to +93

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the previous version caused some warnings

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems more like a hack than a solution to me. I'd try figuring out the actual reason for the warnings.


filter = %ExponentialAutoFilter{factor: factor, direction: direction}

Expand Down
2 changes: 1 addition & 1 deletion test/membrane/integration/demands_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ defmodule Membrane.Integration.DemandsTest do

@impl true
def handle_buffer(pad, buffer, ctx, state) do
buffer = %Membrane.Buffer{buffer | metadata: pad}
buffer = %{buffer | metadata: pad}

{pad_counter, state} = get_and_update_in(state, [:pads_counters, pad], &{&1, &1 + 1})

Expand Down
4 changes: 2 additions & 2 deletions test/membrane/telemetry_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ defmodule Membrane.TelemetryTest do
from: ":filter",
pad_from: ":output",
pad_to: ":input",
parent_component_path: _path,
parent_component_path: path,
to: ":sink"
},
%{
from: ":source",
pad_from: ":output",
pad_to: ":input",
parent_component_path: _path,
parent_component_path: path,
to: ":filter"
}
] = Enum.sort([link1.value, link2.value])
Expand Down