Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for data_collection_server #1599

Merged
merged 9 commits into from
Sep 5, 2018

Conversation

wkentaro
Copy link
Member

@wkentaro wkentaro commented Sep 2, 2018

Close #1598
Close #1596

k-okada and others added 3 commits September 2, 2018 12:37
```
... logging to /home/wkentaro/.ros/log/rostest-hoop-18427.log
[ROSUNIT] Outputting test results to /home/wkentaro/.ros/test_results/jsk_data/rostest-tests_data_collection_server.xml
[Testcase: testtest_data_collection_server] ... ERROR!
ERROR: cannot marshal None unless allow_none is enabled
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostest/runner.py", line 120, in fn
    succeeded, failed = self.test_parent.launch()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostest/rostest_parent.py", line 122, in launch
    return self.runner.launch()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/launch.py", line 657, in launch
    self._setup()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/launch.py", line 644, in _setup
    self._load_parameters()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/launch.py", line 338, in _load_parameters
    r  = param_server_multi()
  File "/usr/lib/python2.7/xmlrpclib.py", line 1006, in __call__
    return MultiCallIterator(self.__server.system.multicall(marshalled_list))
  File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1596, in __request
    allow_none=self.__allow_none)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1094, in dumps
    data = m.dumps(params)
  File "/usr/lib/python2.7/xmlrpclib.py", line 638, in dumps
    dump(v, write)
  File "/usr/lib/python2.7/xmlrpclib.py", line 660, in __dump
    f(self, value, write)
  File "/usr/lib/python2.7/xmlrpclib.py", line 719, in dump_array
    dump(v, write)
  File "/usr/lib/python2.7/xmlrpclib.py", line 660, in __dump
    f(self, value, write)
  File "/usr/lib/python2.7/xmlrpclib.py", line 741, in dump_struct
    dump(v, write)
  File "/usr/lib/python2.7/xmlrpclib.py", line 660, in __dump
    f(self, value, write)
  File "/usr/lib/python2.7/xmlrpclib.py", line 719, in dump_array
    dump(v, write)
  File "/usr/lib/python2.7/xmlrpclib.py", line 660, in __dump
    f(self, value, write)
  File "/usr/lib/python2.7/xmlrpclib.py", line 664, in dump_nil
    raise TypeError, "cannot marshal None unless allow_none is enabled"
```
@wkentaro
Copy link
Member Author

wkentaro commented Sep 2, 2018

libdc1394 error: Failed to initialize libdc1394

ImportError: numpy.core.multiarray failed to import

Traceback (most recent call last):

  File "/home/travis/ros/ws_jsk_common/install/share/jsk_topic_tools/scripts/static_image_publisher.py", line 3, in <module>

    import cv2

ImportError: numpy.core.multiarray failed to import

@wkentaro
Copy link
Member Author

wkentaro commented Sep 2, 2018

[ROSUNIT] Outputting test results to /home/travis/.ros/test_results/jsk_data/rostest-tests_data_collection_server.xml

Traceback (most recent call last):

  File "/home/travis/ros/ws_jsk_common/install/share/jsk_topic_tools/scripts/static_image_publisher.py", line 4, in <module>

    from scipy.misc import face

  File "/usr/lib/python2.7/dist-packages/scipy/misc/__init__.py", line 57, in <module>

    from .pilutil import *

  File "/usr/lib/python2.7/dist-packages/scipy/misc/pilutil.py", line 20, in <module>

    from PIL import Image, ImageFilter

  File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 88, in <module>

    import builtins

KeyboardInterrupt

Traceback (most recent call last):

  File "/opt/ros/indigo/lib/rostopic/rostopic", line 35, in <module>

    rostopic.rostopicmain()

  File "/opt/ros/indigo/lib/python2.7/dist-packages/rostopic/__init__.py", line 1926, in rostopicmain

    _rostopic_cmd_pub(argv)

  File "/opt/ros/indigo/lib/python2.7/dist-packages/rostopic/__init__.py", line 1595, in _rostopic_cmd_pub

    pub, msg_class = create_publisher(topic_name, topic_type, latch)

  File "/opt/ros/indigo/lib/python2.7/dist-packages/rostopic/__init__.py", line 1429, in create_publisher

    rospy.init_node('rostopic', anonymous=True, disable_rosout=True, disable_rostime=True)

  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/client.py", line 320, in init_node

    raise rospy.exceptions.ROSInitException("init_node interrupted before it could complete")

rospy.exceptions.ROSInitException: init_node interrupted before it could complete

testtest_data_collection_server ... FAILURE!

FAILURE: Test Fixture Nodes ['data_collection_server_request', 'data_collection_server_timer', 'data_collection_server_all'] failed to launch

  File "/usr/lib/python2.7/unittest/case.py", line 331, in run

    testMethod()

  File "/opt/ros/indigo/lib/python2.7/dist-packages/rostest/runner.py", line 121, in fn

    self.assert_(not failed, "Test Fixture Nodes %s failed to launch"%failed)

  File "/usr/lib/python2.7/unittest/case.py", line 424, in assertTrue

    raise self.failureException(msg)

@wkentaro
Copy link
Member Author

wkentaro commented Sep 3, 2018

Actually, I can't find how to fix the error on travis..

@k-okada
Copy link
Member

k-okada commented Sep 4, 2018

@wkentaro I could reproduce this problem by

virtualenv venv
cd venv
. ./bin/activate
pip install -U -q slacker-cli
pip install -U -q gdown
pip install -U -q pygithub3
pip install -U -q gdown
pip install -U -q percol
pip install -U -q freezegun
pip install -U -q tabulate
source /opt/ros/kinetic/setup.bash
python -v
>>> import cv2
>>> import cv2
dlopen("/opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so", 2);
ImportError: numpy.core.multiarray failed to import
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: numpy.core.multiarray failed to import
>>> sys.path
['', '/opt/ros/kinetic/lib/python2.7/dist-packages', '/tmp/venv/lib/python2.7', '/tmp/venv/lib/python2.7/plat-x86_64-linux-gnu', '/tmp/venv/lib/python2.7/lib-tk', '/tmp/venv/lib/python2.7/lib-old', '/tmp/venv/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/tmp/venv/local/lib/python2.7/site-packages', '/tmp/venv/lib/python2.7/site-packages']

Do they decided not to load from system path?

@wkentaro
Copy link
Member Author

wkentaro commented Sep 4, 2018

Actually, I fixed the error of numpy.core.multiarray failed to import by 10d0c6a. (It's hotfix, though..)
But I can't fix the problem of KeyboardInterruptedError in #1599 (comment).

@k-okada
Copy link
Member

k-okada commented Sep 4, 2018

KeyboardInterruptedError raised because of sending "C-c" signal when the test was stopped, I think.

@wkentaro
Copy link
Member Author

wkentaro commented Sep 4, 2018

Thank you. I found the fix.
23ab4d5 fixes it. I missed node_scripts to install.

@wkentaro
Copy link
Member Author

wkentaro commented Sep 4, 2018

Now the test passes, and this pr is ready to be merged. Could you merge this? @k-okada

@k-okada k-okada merged commit f2cba06 into jsk-ros-pkg:master Sep 5, 2018
@k-okada
Copy link
Member

k-okada commented Sep 5, 2018

thank you!

@wkentaro wkentaro deleted the k-okada-add_test_for_1597 branch September 5, 2018 05:37
wkentaro added a commit to wkentaro/jsk_common that referenced this pull request Sep 6, 2018
iory pushed a commit to iory/jsk_common that referenced this pull request Nov 3, 2018
iory pushed a commit to iory/jsk_common that referenced this pull request Nov 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants