You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by cdwijayarathna <gi...@git.apache.org> on 2014/08/18 20:20:35 UTC

[GitHub] thrift pull request: THRIFT-2668 TestSuite: detailed result on pas...

GitHub user cdwijayarathna opened a pull request:

    https://github.com/apache/thrift/pull/194

    THRIFT-2668 TestSuite: detailed result on passed tests by feature

    THRIFT-2668 TestSuite: detailed result on passed tests by feature
    added for py, java and cpp

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cdwijayarathna/thrift THRIFT-2668

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/194.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #194
    
----
commit a150df6e3dc98ec63a599bd813db1b840ab58df1
Author: cdwijayarathna <cd...@gmail.com>
Date:   2014-08-18T09:41:20Z

    THRIFT-2668 TestSuite: detailed result on passed tests by feature
    
    THRIFT-2668 TestSuite: detailed result on passed tests by feature
    
    THRIFT-2668 TestSuite: detailed result on passed tests by feature

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: THRIFT-2668 TestSuite: detailed result on pas...

Posted by bufferoverflow <gi...@git.apache.org>.
Github user bufferoverflow commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/194#discussion_r16374767
  
    --- Diff: test/cpp/src/TestClient.cpp ---
    @@ -698,5 +756,28 @@ int main(int argc, char** argv) {
       printf("Max time: %" PRIu64 " us\n", time_max);
       printf("Avg time: %" PRIu64 " us\n", time_avg);
     
    +  int ret = 255 - TEST_NOTUSED;
    +  if(!test_basetypes_fails){
    +    ret = ret - TEST_BASETYPES;
    +  }
    +  if(!test_structs_fails){
    +    ret = ret - TEST_STRUCTS;
    +  }
    +  if(!test_containers_fails){
    +    ret = ret - TEST_CONTAINERS;
    +  }
    +  if(!test_exceptions_fails){
    +    ret = ret - TEST_EXCEPTIONS;
    +  }
    +  if(!test_complex_fails){
    +    ret = ret - TEST_COMPLEX;
    +  }
    +  if(!test_enumtypedef_fails){
    +    ret = ret - TEST_ENUMTYPEDEF;
    +  }
    +  if(!test_oneway_fails){
    +    ret = ret - TEST_ONEWAY;
    +  }
    +
       return failCount;
    --- End diff --
    
        return ret;


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request #194: THRIFT-2668 TestSuite: detailed result on passed t...

Posted by jfarrell <gi...@git.apache.org>.
Github user jfarrell closed the pull request at:

    https://github.com/apache/thrift/pull/194


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: THRIFT-2668 TestSuite: detailed result on pas...

Posted by cdwijayarathna <gi...@git.apache.org>.
Github user cdwijayarathna commented on the pull request:

    https://github.com/apache/thrift/pull/194#issuecomment-52760264
  
    @bufferoverflow committed suggested changes in java, cpp, py.
    Since python uses unittest framework, using exit(ret), stopped printing failure details of failed tests in command line.
    
    eg:-
    FAIL: testString (__main__.NormalBinaryTest)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "py/TestClient.py", line 125, in testString
        raise AssertionError( e.args )
    AssertionError: ("'PythonPythonPythonPythonPythonPythonPythonPythonPythonPythonPythonPythonPythonPythonPythonPythonPythonPythonPythonPython' != 'PythoPythoPythoPythoPythoPythoPythoPythoPythoPythoPythoPythoPythoPythoPythoPythoPythoPythoPythoPytho'",)
    
    ----------------------------------------------------------------------
    Ran 18 tests in 1.256s
    
    FAILED (failures=1)
    
    I couldn't found any way to exit(ret) with keeping above, I'll check more if any better solution.
    Ruby is also 75% implemented, I'll finish it soon and commit.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: THRIFT-2668 TestSuite: detailed result on pas...

Posted by bufferoverflow <gi...@git.apache.org>.
Github user bufferoverflow commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/194#discussion_r16374841
  
    --- Diff: test/py/TestClient.py ---
    @@ -94,29 +111,91 @@ def tearDown(self):
         # Close!
         self.transport.close()
     
    +  @classmethod
    +  def tearDownClass(cls):
    +    ret = 255 - TEST_NOTUSED
    +    if(not test_basetypes_fails):
    +      ret = ret - TEST_BASETYPES
    +    if(not test_structs_fails):
    +      ret = ret - TEST_STRUCTS
    +    if(not test_containers_fails):
    +      ret = ret - TEST_CONTAINERS
    +    if(not test_exceptions_fails):
    +      ret = ret - TEST_EXCEPTIONS
    +    if(not test_complex_fails):
    +      ret = ret - TEST_COMPLEX
    +    if(not test_enumtypedef_fails):
    +      ret = ret - TEST_ENUMTYPEDEF
    +    if(not test_oneway_fails):
    +      ret = ret - TEST_ONEWAY
    +
    --- End diff --
    
    return ret?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: THRIFT-2668 TestSuite: detailed result on pas...

Posted by bufferoverflow <gi...@git.apache.org>.
Github user bufferoverflow commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/194#discussion_r16448295
  
    --- Diff: lib/java/test/org/apache/thrift/test/TestClient.java ---
    @@ -642,7 +684,28 @@ public static void main(String [] args) {
           System.exit(1);
         }
     
    -
    +    int ret = 255 - TEST_NOTUSED;
    +    if(!test_basetypes_fails){
    +      ret = ret - TEST_BASETYPES;
    +    }
    +    if(!test_structs_fails){
    +      ret = ret - TEST_STRUCTS;
    +    }
    +    if(!test_containers_fails){
    +      ret = ret - TEST_CONTAINERS;
    +    }
    +    if(!test_exceptions_fails){
    +      ret = ret - TEST_EXCEPTIONS;
    +    }
    +    if(!test_complex_fails){
    +      ret = ret - TEST_COMPLEX;
    +    }
    +    if(!test_enumtypedef_fails){
    +      ret = ret - TEST_ENUMTYPEDEF;
    +    }
    +    if(!test_oneway_fails){
    +      ret = ret - TEST_ONEWAY;
    +    }
         System.exit(failCount);
    --- End diff --
    
    yes,
    0 = success
    and 1-255 is detailed error based on bitset defines


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift issue #194: THRIFT-2668 TestSuite: detailed result on passed tests by...

Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on the issue:

    https://github.com/apache/thrift/pull/194
  
    @jfarrell this is marked closed/fixed in Jira.  This PR can be closed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: THRIFT-2668 TestSuite: detailed result on pas...

Posted by cdwijayarathna <gi...@git.apache.org>.
Github user cdwijayarathna commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/194#discussion_r16376522
  
    --- Diff: lib/java/test/org/apache/thrift/test/TestClient.java ---
    @@ -642,7 +684,28 @@ public static void main(String [] args) {
           System.exit(1);
         }
     
    -
    +    int ret = 255 - TEST_NOTUSED;
    +    if(!test_basetypes_fails){
    +      ret = ret - TEST_BASETYPES;
    +    }
    +    if(!test_structs_fails){
    +      ret = ret - TEST_STRUCTS;
    +    }
    +    if(!test_containers_fails){
    +      ret = ret - TEST_CONTAINERS;
    +    }
    +    if(!test_exceptions_fails){
    +      ret = ret - TEST_EXCEPTIONS;
    +    }
    +    if(!test_complex_fails){
    +      ret = ret - TEST_COMPLEX;
    +    }
    +    if(!test_enumtypedef_fails){
    +      ret = ret - TEST_ENUMTYPEDEF;
    +    }
    +    if(!test_oneway_fails){
    +      ret = ret - TEST_ONEWAY;
    +    }
         System.exit(failCount);
    --- End diff --
    
    In test.sh we use the returning value (fail count) for reporting in status.html and in command line.
    So changing exit value will affect it.
    Shall I go ahead and change it?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: THRIFT-2668 TestSuite: detailed result on pas...

Posted by bufferoverflow <gi...@git.apache.org>.
Github user bufferoverflow commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/194#discussion_r16374731
  
    --- Diff: lib/java/test/org/apache/thrift/test/TestClient.java ---
    @@ -642,7 +684,28 @@ public static void main(String [] args) {
           System.exit(1);
         }
     
    -
    +    int ret = 255 - TEST_NOTUSED;
    +    if(!test_basetypes_fails){
    +      ret = ret - TEST_BASETYPES;
    +    }
    +    if(!test_structs_fails){
    +      ret = ret - TEST_STRUCTS;
    +    }
    +    if(!test_containers_fails){
    +      ret = ret - TEST_CONTAINERS;
    +    }
    +    if(!test_exceptions_fails){
    +      ret = ret - TEST_EXCEPTIONS;
    +    }
    +    if(!test_complex_fails){
    +      ret = ret - TEST_COMPLEX;
    +    }
    +    if(!test_enumtypedef_fails){
    +      ret = ret - TEST_ENUMTYPEDEF;
    +    }
    +    if(!test_oneway_fails){
    +      ret = ret - TEST_ONEWAY;
    +    }
         System.exit(failCount);
    --- End diff --
    
    this should be changed to:
    
        System.exit(ret);


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---