Add a unit test for JavaAgent preconditions and attribute wiring.

Review Request #770 — Created July 28, 2014 and submitted

jsirois
pants
jsirois/java_agent/test
403
pants-reviews
jinfeng, johanoskarsson
commit f96ab011835fe916aed7afe99fdbbb246a4bd2d9
Author: John Sirois <jsirois@twitter.com>
Date:   Sun Jul 27 20:40:39 2014 -0600

    Add a unit test for JavaAgent preconditions and attribute wiring.

 tests/python/pants_test/targets/BUILD              | 12 +++++++
 tests/python/pants_test/targets/test_java_agent.py | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 98 insertions(+)
Failed after test add, fixed after JavaAgent fix:
==
$ PANTS_DEV=1 ./pants goal test tests/python/pants_test/targets --test-pytest-options="-v -kJavaAgentTest"
...
20:42:36 00:00   [test]
20:42:36 00:00     [pytest]
20:42:36 00:00       [run]
                     ============== test session starts ===============
                     platform linux2 -- Python 2.6.9 -- py-1.4.22 -- pytest-2.6.0 -- /usr/bin/python2.6
                     plugins: cov, timeout
                     collected 40 items 
                     
                     tests/python/pants_test/targets/test_java_agent.py@55::JavaAgentTest::test_can_redefine PASSED
                     tests/python/pants_test/targets/test_java_agent.py@66::JavaAgentTest::test_can_retransform PASSED
                     tests/python/pants_test/targets/test_java_agent.py@77::JavaAgentTest::test_can_set_native_method_prefix PASSED
                     tests/python/pants_test/targets/test_java_agent.py@39::JavaAgentTest::test_defaults PASSED
                     tests/python/pants_test/targets/test_java_agent.py@35::JavaAgentTest::test_minimal PASSED
                     tests/python/pants_test/targets/test_java_agent.py@31::JavaAgentTest::test_required PASSED
                     
                     ==== 34 tests deselected by '-kJavaAgentTest' ====
                     ==== 6 passed, 34 deselected in 0.38 seconds =====
                     
20:42:38 00:02     [junit]
20:42:38 00:02     [specs]
               SUCCESS
JS
  1. CI away here: https://travis-ci.org/pantsbuild/pants/builds/31007094
  2. 
      
JS
JS
  1. And new ci after rebase also went green: https://travis-ci.org/pantsbuild/pants/builds/31007877
  2. 
      
JI
  1. 
      
  2. tests/python/pants_test/targets/BUILD (Diff revision 2)
     
     
     
     
    should we dictionary sort these?
    1. Absolutely - thanks.
  3. 
      
JS
JI
  1. Ship It!
  2. 
      
JS
  1. And the dep sort went green here: https://travis-ci.org/pantsbuild/pants/builds/31009436
  2. 
      
JS
  1. Thanks Jin - submitted @ https://github.com/pantsbuild/pants/commit/275828af1184e984684a86efa3c5d4cac2cba9b8
  2. 
      
JS
Review request changed

Status: Closed (submitted)

Loading...