Commits

Anonymous committed 1815b38

Check for unexpected messages

  • Participants
  • Parent commits e2697e9

Comments (0)

Files changed (1)

File test/lhttpc_tests.erl

                 ?_test(suspended_manager()),
                 ?_test(chunked_encoding()),
                 ?_test(close_connection()),
+                ?_test(message_queue()),
                 ?_test(connection_count()) % just check that it's 0 (last)
             ]}
     }.
 
 %%% Tests
 
+message_queue() ->
+    receive X -> erlang:error({unexpected_message, X}) after 0 -> ok end.
+
 simple_get() ->
     simple(get),
     simple("GET").