Skip to content

Commit

Permalink
Added bogus test to debug Travis problems
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed May 11, 2016
1 parent 6d074eb commit b1d7f61
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ language: python
python:
- "3.5"

addons:
apt:
packages:
- openjdk-7-jre-headless

install: pip install tox-travis coveralls

script: tox
Expand Down
21 changes: 20 additions & 1 deletion tests/test_component.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
import os
from subprocess import Popen, PIPE

import pytest
from py4j.java_gateway import JavaGateway, CallbackServerParameters
import subprocess
from py4j.java_gateway import JavaGateway, CallbackServerParameters, find_jar_path
from py4j.protocol import Py4JError

from asphalt.core.context import Context
from asphalt.py4j.component import Py4JComponent


def test_why_java_fails_to_run():
command = ['java', '-classpath', '/home/travis/build/asphalt-framework/asphalt-py4j/.tox/py35/share/py4j/py4j0.10.0.jar:', 'py4j.GatewayServer', '0']
proc = Popen(command, stdout=PIPE, stdin=PIPE, stderr=PIPE)
print('stderr:', proc.stderr.readline())
print('stdout:', proc.stdout.readline())
proc.kill()
assert proc.returncode == 0

# process = subprocess.run(['java', '-showversion'], stdout=subprocess.PIPE,
# stderr=subprocess.PIPE)
# print('return code: %d' % process.returncode)
# print('stdout: %s' % process.stdout.decode())
# print('stderr: %s' % process.stderr.decode())
# assert process.returncode == 0


@pytest.mark.asyncio
async def test_default_gateway(caplog):
"""Test that the default gateway is started and is available on the context."""
Expand Down

0 comments on commit b1d7f61

Please sign in to comment.