You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On mocking a Flume enqueue in test env. we do not serialize the args. This is inconsistent with how the worker module receives the args on a dequeue from the queue.
However, in an environment without mocks the job is serialized(Jason.encode!/1) before we enqueue it.
This may differ from a possible expectation of a worker to receive serialized arguments.
The worker module executes the following equivalent of the operation
On mocking a Flume enqueue in test env. we do not serialize the args. This is inconsistent with how the worker module receives the args on a dequeue from the queue.
Example
Operation
Test env with mocks
However, in an environment without mocks the job is serialized(
Jason.encode!/1
) before we enqueue it.This may differ from a possible expectation of a worker to receive serialized arguments.
The worker module executes the following equivalent of the operation
So, the assertion should actually be against a serialized-deserialized version of the arguments.
Solution
Update the Mocked API to serialize and deserialize the arguments.
The text was updated successfully, but these errors were encountered: