fix: add Process.sleep to async broadcast tests and update Renovate workflow for Forgejo
- Fix PacketConsumerTest timing issues by adding Process.sleep(50) after handle_events to wait for async broadcast tasks to complete before assertions - Update Renovate workflow to use Docker container directly instead of GitHub Action - Use full GitHub URL for checkout action to work with Forgejo Actions
This commit is contained in:
parent
6e6fa114e2
commit
a74a571844
2 changed files with 11 additions and 5 deletions
|
|
@ -9,17 +9,19 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
renovate:
|
renovate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: renovate/renovate:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v6
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Run Renovate
|
- name: Run Renovate
|
||||||
uses: renovatebot/github-action@v42.0.4
|
|
||||||
with:
|
|
||||||
configurationFile: renovate.json
|
|
||||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
|
||||||
env:
|
env:
|
||||||
RENOVATE_PLATFORM: gitea
|
RENOVATE_PLATFORM: gitea
|
||||||
RENOVATE_ENDPOINT: ${{ secrets.FORGEJO_ENDPOINT }}
|
RENOVATE_ENDPOINT: ${{ secrets.FORGEJO_ENDPOINT }}
|
||||||
|
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
RENOVATE_GIT_AUTHOR: Renovate Bot <bot@renovateapp.com>
|
RENOVATE_GIT_AUTHOR: Renovate Bot <bot@renovateapp.com>
|
||||||
|
RENOVATE_AUTODISCOVER: false
|
||||||
LOG_LEVEL: info
|
LOG_LEVEL: info
|
||||||
|
run: |
|
||||||
|
renovate graham/aprs.me
|
||||||
|
|
|
||||||
|
|
@ -225,6 +225,8 @@ defmodule Aprsme.PacketConsumerTest do
|
||||||
}
|
}
|
||||||
|
|
||||||
PacketConsumer.handle_events(events, nil, state)
|
PacketConsumer.handle_events(events, nil, state)
|
||||||
|
# Wait for async broadcast task to complete
|
||||||
|
Process.sleep(50)
|
||||||
|
|
||||||
# Should receive the packet via PubSub
|
# Should receive the packet via PubSub
|
||||||
assert_receive {:streaming_packet, packet}, 1000
|
assert_receive {:streaming_packet, packet}, 1000
|
||||||
|
|
@ -353,6 +355,8 @@ defmodule Aprsme.PacketConsumerTest do
|
||||||
}
|
}
|
||||||
|
|
||||||
PacketConsumer.handle_events(events, nil, state)
|
PacketConsumer.handle_events(events, nil, state)
|
||||||
|
# Wait for async broadcast task to complete
|
||||||
|
Process.sleep(50)
|
||||||
|
|
||||||
assert_receive {:streaming_packet, packet}, 1000
|
assert_receive {:streaming_packet, packet}, 1000
|
||||||
assert packet.sender == "FALLBACK1"
|
assert packet.sender == "FALLBACK1"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue