The "_ =" is just to signal that the function returns something (in this
case handlers) but we are not interested in the result. It does not change
the code in any possible way. If the test fails, that's a race condition in
the suite and should not be related to your code change.



*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

On Thu, Jun 2, 2016 at 10:48 PM, <[email protected]> wrote:

> This could me my bad: the test failure only occurs sometimes. I guess my
> computer is to slow :-)
>
> Den torsdag 2 juni 2016 kl. 22:15:39 UTC+2 skrev [email protected]:
>>
>> OK, so I figured out that "_=" actually has effect because if I remove _=
>> from line 205 in logger.ex the tests fails.
>>
>> $ git diff
>> diff --git a/lib/logger/lib/logger.ex b/lib/logger/lib/logger.ex
>> index 0ef5ede..644ffcb 100644
>> --- a/lib/logger/lib/logger.ex
>> +++ b/lib/logger/lib/logger.ex
>> @@ -402,7 +402,7 @@ defmodule Logger do
>>    """
>>    @spec flush :: :ok
>>    def flush do
>> -    _ = GenEvent.which_handlers(:error_logger)
>> +    GenEvent.which_handlers(:error_logger)
>>      GenEvent.sync_notify(Logger, :flush)
>>    end
>>
>> $ make clean test
>> ......
>>
>>   1) test drop/2 with negative count stream entries (StreamTest)
>>      test/elixir/stream_test.exs:202
>>      No message matching {:stream, 1} after 100ms.
>>      The process mailbox is empty.
>>      stacktrace:
>>        test/elixir/stream_test.exs:215: (test)
>>
>>
>> Can someone please help me understand?
>>
>>
>>> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-talk/3c1f5f6b-cfdc-440d-bbe8-a061660c6622%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-talk/3c1f5f6b-cfdc-440d-bbe8-a061660c6622%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-talk/CAGnRm4JzNKBgbSuVOgYJgMmrVy4i48B2KeJT--QmeKUVB3FNtg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to