sudo: required
language: java
before_install:
 - sudo apt-get update -qq
 - sudo apt-get install -qq python-pip python-virtualenv libevent-dev
after_script: src/test/resources/run-s3-tests.sh

sudo: required
language: java
before_install:
 - sudo apt-get update -qq
 - sudo apt-get install -qq python-pip python-virtualenv libevent-dev
script:
 - mvn test
 - ./src/test/resources/run-s3-tests.sh

Use script instead of after_script
Use script instead of after_script

The former propagates the exit code.
