Skip to content

Commit

Permalink
Changes from PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebakken committed Mar 2, 2018
1 parent 07a6602 commit 7e1cb18
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ script:
- nosetests
- PIKA_TEST_TLS=true nosetests

after_script:
- /bin/sh "$TRAVIS_BUILD_DIR/rabbitmq_server-$RABBITMQ_VERSION/sbin/rabbitmqctl" shutdown

after_success:
- aws s3 cp .coverage "s3://com-gavinroy-travis/pika/$TRAVIS_BUILD_NUMBER/.coverage.${TRAVIS_PYTHON_VERSION}"

Expand Down
21 changes: 21 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,27 @@ Note that some tests are OS-specific (e.g. epoll on Linux
or kqueue on MacOS and BSD). Those will be skipped
automatically.

If you would like to run TLS/SSL tests, use the following procedure:

* Create a `rabbitmq.conf` file:

```
sed -e "s#PIKA_DIR#$PWD#g" ./testdata/rabbitmq.conf.in > ./testdata/rabbitmq.conf
```

* Start RabbitMQ and use the configuration file you just created. An example command
that works with the `generic-unix` package is as follows:

```
$ RABBITMQ_CONFIG_FILE=/path/to/pika/testdata/rabbitmq.conf ./sbin/rabbitmq-server
```

* Run the tests indicating that TLS/SSL connections should be used:

```
PIKA_TEST_TLS=true nosetests
```


## Code Formatting

Expand Down
9 changes: 4 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ environment:
erlang_download_url: "http://erlang.org/download/otp_win64_19.3.exe"
erlang_exe_path: "C:\\Users\\appveyor\\erlang_19.3.exe"
erlang_home_dir: "C:\\Users\\appveyor\\erlang"
erlang_erts_version: "erts-8.3"

rabbitmq_version: 3.7.3
rabbitmq_installer_download_url: "https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.3/rabbitmq-server-3.7.3.exe"
rabbitmq_installer_path: "C:\\Users\\appveyor\\rabbitmq-server-3.7.3.exe"

Expand All @@ -28,9 +30,6 @@ install:
- SET PYTHONPATH=%PYTHONHOME%
- SET PATH=%PYTHONHOME%\Scripts;%PYTHONHOME%;%PATH%

- ECHO Turning off firewall...
- ps: Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False

# For diagnostics
- ECHO %PYTHONPATH%
- ECHO %PATH%
Expand Down Expand Up @@ -98,11 +97,11 @@ before_test:
- ps: 'C:\projects\pika\testdata\wait-rabbitmq.ps1'

- ECHO Getting RabbitMQ status...
- cmd /c "C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.3\sbin\rabbitmqctl.bat" status
- cmd /c "C:\Program Files\RabbitMQ Server\rabbitmq_server-%rabbitmq_version%\sbin\rabbitmqctl.bat" status


test_script:
- nosetests

# Not deploying Windows builds yet TODO
# Since Pika is source-only there's no need to deploy from Windows
deploy: false
6 changes: 1 addition & 5 deletions testdata/wait-epmd.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
$running = $false
[int]$count = 1

if ($env:ERLANG_HOME) {
$epmd = Join-Path -Path $env:ERLANG_HOME 'erts-8.3\bin\epmd.exe'
} else {
$epmd = 'C:\Users\appveyor\erlang\erts-8.3\bin\epmd.exe'
}
$epmd = [System.IO.Path]::Combine($env:ERLANG_HOME, $env:erlang_erts_version, "bin", "epmd.exe")

Do {
$running = & $epmd -names | Select-String -CaseSensitive -SimpleMatch -Quiet -Pattern 'name rabbit at port 25672'
Expand Down
2 changes: 1 addition & 1 deletion testdata/wait-rabbitmq.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Do {
$proc_id = (Get-Process -Name erl).Id
if (-Not ($proc_id -is [array])) {
& 'C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.3\sbin\rabbitmqctl.bat' wait -t 300000 -P $proc_id
& "C:\Program Files\RabbitMQ Server\rabbitmq_server-$env:rabbitmq_version\sbin\rabbitmqctl.bat" wait -t 300000 -P $proc_id
if ($LASTEXITCODE -ne 0) {
throw "[ERROR] rabbitmqctl wait returned error: $LASTEXITCODE"
}
Expand Down

0 comments on commit 7e1cb18

Please sign in to comment.