Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2929

Include test_client when running erlang tests

    XMLWordPrintableJSON

    Details

    • Type: Test
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Erlang - Library
    • Labels:
      None

      Description

      There are several detailed client, server assertions in test_client.erl, that are currently not used anywhere.

      Currently, rebar eunit skips over several modules in test/ since the function names do not end with _test

      cd lib/erl && make 
      rebar eunit -v
      ...
      <snipped>
      module 'test_thrift_1151'
        test_thrift_1151: unmatched_struct_test...ok
        test_thrift_1151: badarg_test...ok
        [done in 0.006 s]
      module 'test_membuffer'
        test_membuffer: encode_decode_1_test...ok
        test_membuffer: encode_decode_2_test...ok
        test_membuffer: encode_decode_3_test...
      =INFO REPORT==== 5-Jan-2015::03:14:36 ===
      Skipping field 4 with wrong type (3 != 8)
      ok
        test_membuffer: encode_decode_4_test...ok
        test_membuffer: encode_decode_5_test...ok
        [done in 0.016 s]
      module 'test_disklog'
        test_disklog: disklog_test...[0.030 s] ok
        test_disklog: disklog_base64_test...[0.005 s] ok
        [done in 0.041 s]
      module 'test_server'
      module 'test_client'
      module 'stress_server'
      module 'second_service_thrift'
      

      I recommend including test_server & test_client first, and separate issues/commits for enabling each of the other modules.

      The fix would involve refactoring the said modules to add _test functions without changing the currently exported functions.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bosky Bhasker Kode
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: