Skip to content

Commit

Permalink
Check if service is running at all
Browse files Browse the repository at this point in the history
  • Loading branch information
joerivanruth committed Nov 8, 2024
1 parent 2f80f72 commit 911ab3f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

test-windows:
runs-on: windows-latest
timeout-minutes: 5
timeout-minutes: 3
steps:

- uses: actions/checkout@v4
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,13 @@ runs:
if: runner.os == 'Windows'
run: |
Start-Process -FilePath "C:\Program Files\MonetDB\MonetDB5\MSQLserver.bat" -NoNewWindow -ArgumentList "--set","embedded_py=false"
python3 ${{ github.action_path }}\tryconnect.py
shell: pwsh

- name: Is it still running?
run: ${{ github.action_path }}\python3 tryconnect.py
shell: pwsh

- name: Communicate bindir, libdir, includedir and dynsuffix
id: set_output
run: |
Expand Down
5 changes: 5 additions & 0 deletions tryconnect.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#!/usr/bin/env python3

import socket
import time

addrs = [
('::1', 50_000),
('127.0.0.1', 50_000),
]

duration = 2.5
print('Sleeping {duration}s')
time.sleep(duration)

for a in addrs:
print(f"Connecting to {a}")
try:
Expand Down

0 comments on commit 911ab3f

Please sign in to comment.