How are you sending messages to that process?
I notice that you’re doing this in a handle_call which is synchronous. So, if you only have one process doing a GenServer.call to this process it’ll block until it gets a response. That means, you’ll never have a queue length, because this handle_call is consuming the only message that has been sent.
In short, what you’re doing is correct, but the way you’re testing it isn’t.






















