Skip to content

Commit

Permalink
GH actions are bad & don't let background processes continue to print…
Browse files Browse the repository at this point in the history
… to section

Also fix signals test
  • Loading branch information
serprex committed Mar 2, 2024
1 parent 8e54ae9 commit d33402a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 47 deletions.
46 changes: 5 additions & 41 deletions .github/workflows/flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,50 +89,14 @@ jobs:
- name: Install Temporal CLI
uses: temporalio/setup-temporal@v0

- run: temporal server start-dev --namespace default --headless &

- run: go build -ldflags="-s -w" -o peer-flow .
working-directory: ./flow

- run: ./peer-flow worker &
working-directory: ./flow
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
PEERDB_CATALOG_HOST: localhost
PEERDB_CATALOG_PORT: 5432
PEERDB_CATALOG_USER: postgres
PEERDB_CATALOG_PASSWORD: postgres
PEERDB_CATALOG_DATABASE: postgres

- run: ./peer-flow snapshot-worker &
working-directory: ./flow
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
PEERDB_CATALOG_HOST: localhost
PEERDB_CATALOG_PORT: 5432
PEERDB_CATALOG_USER: postgres
PEERDB_CATALOG_PASSWORD: postgres
PEERDB_CATALOG_DATABASE: postgres

- name: temporal monitoring
run: |
(
while :
do sleep 10
temporal task-queue describe --task-queue=peer-flow-task-queue
temporal task-queue list-partition --task-queue=peer-flow-task-queue
temporal workflow list
done
)&
- name: run tests
run: |
temporal server start-dev --namespace default --headless &
go build -ldflags="-s -w" -o peer-flow
temporal operator search-attribute create --name MirrorName --type Text --namespace default
go test -p 24 ./... -timeout 1200s
./peer-flow worker &
./peer-flow snapshot-worker &
go test -p 32 ./... -timeout 1200s
working-directory: ./flow
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
8 changes: 2 additions & 6 deletions flow/e2e/postgres/peer_flow_pg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1189,13 +1189,9 @@ func (s PeerFlowE2ETestSuitePG) Test_Dynamic_Mirror_Config_Via_Signals() {
e2e.EnvWaitFor(s.t, env, 1*time.Minute, "normalize 18 records - first table", func() bool {
return s.comparePGTables(srcTable1Name, dstTable1Name, "id,t") == nil
})
/* TODO fix in integration tests
e2e.EnvWaitFor(s.t, env, 2*time.Minute, "initial load + normalize 18 records - second table", func() bool {
err := s.comparePGTables(srcTable2Name, dstTable2Name, "id,t")
s.t.Log("TEST", err)
return err == nil
return s.comparePGTables(srcTable2Name, dstTable2Name, "id,t") == nil
})
*/

workflowState = getWorkflowState()
assert.EqualValues(s.t, 14, workflowState.SyncFlowOptions.IdleTimeoutSeconds)
Expand All @@ -1205,7 +1201,7 @@ func (s PeerFlowE2ETestSuitePG) Test_Dynamic_Mirror_Config_Via_Signals() {
assert.Len(s.t, workflowState.SyncFlowOptions.TableNameSchemaMapping, 2)
// 3 from first insert of 18 rows in 1 table
// 3 from second insert of 18 rows in 2 tables, batch size updated
assert.GreaterOrEqual(s.t, len(workflowState.SyncFlowStatuses), 3+1+3)
assert.GreaterOrEqual(s.t, len(workflowState.SyncFlowStatuses), 6)
}

env.Cancel()
Expand Down

0 comments on commit d33402a

Please sign in to comment.