Skip to content

Commit dc3da0d

Browse files
authored
fix: [CPCAP-9876] change master deletion logic check (#452)
* fix: [CPCAP-9876] change master deletion logic check
1 parent 36b3991 commit dc3da0d

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

.github/workflows/run_tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ jobs:
2828
Pgskipper-Pipeline:
2929
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.user.login != 'dependabot[bot]' }}
3030
needs: Wait-for-images
31-
uses: Netcracker/qubership-test-pipelines/.github/workflows/pgskipper.yaml@34e86efe815cb03fea20efa760989cd21ca0c776 #master
31+
uses: Netcracker/qubership-test-pipelines/.github/workflows/pgskipper.yaml@timeout_pg #master
3232
with:
3333
repository_name: ${{ github.repository }}
3434
service_branch: '${{ github.head_ref || github.ref_name }}'
35-
pipeline_branch: '34e86efe815cb03fea20efa760989cd21ca0c776' #this value must match the value after '@' in 'uses'
35+
pipeline_branch: 'timeout_pg' #this value must match the value after '@' in 'uses'
3636
secrets:
3737
AWS_S3_ACCESS_KEY_ID: ${{secrets.AWS_S3_ACCESS_KEY_ID}}
3838
AWS_S3_ACCESS_KEY_SECRET: ${{secrets.AWS_S3_ACCESS_KEY_SECRET}}
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*** Settings ***
2-
Documentation Check scaledown replica
2+
Documentation Check delete master
33
Library Collections
44
Library OperatingSystem
55
Library String
@@ -10,25 +10,25 @@ Resource ../Lib/lib.robot
1010
Check Delete Master
1111
[Tags] patroni full check_delete_master
1212
Run Keyword Checks Before Tests
13+
1314
${MASTER}= Get Master Pod
14-
# insert test records
15+
${OLD_MASTER_NAME}= Set Variable ${MASTER.metadata.name}
16+
17+
# insert test records before deleting master
1518
${RID} ${EXPECTED}= Insert Test Record ${MASTER.status.pod_ip}
16-
# delete mater pod
17-
Log To Console Deleting Master Pod "${MASTER.metadata.name}"
18-
Run Keyword Delete Pod ${MASTER.metadata.name} 30
19-
# wait new master
20-
Log To Console Wait new master election keyword
21-
Wait Until Keyword Succeeds 120 sec 1 sec Check If New Master Elected ${MASTER.metadata.name}
22-
# wait while all replicas back
23-
Wait Until Keyword Succeeds 120 sec 1 sec Check Replica Count
19+
20+
Log To Console Deleting Master Pod "${OLD_MASTER_NAME}"
21+
Run Keyword Delete Pod ${OLD_MASTER_NAME} 30
22+
23+
Log To Console Wait until cluster recovers after master deletion
24+
Wait Until Keyword Succeeds 300 sec 5 sec Wait Replica Pods In Up State
25+
Wait Until Keyword Succeeds 300 sec 5 sec Check Replica Count
26+
2427
${NEW_MASTER}= Get Master Pod
25-
Log To Console New Master ${NEW_MASTER.metadata.name}
26-
# wait new replica pod is up
27-
Wait Until Keyword Succeeds 120 sec 2 sec Wait Replica Pods In Up State
28-
# check master not read-only
29-
Log To Console Test New Master Works
30-
Wait Until Keyword Succeeds ${120} 1 sec Insert Test Record ${NEW_MASTER.status.pod_ip}
31-
# check existance unavaliabled replicas
32-
Run Keyword Check Replica Count
33-
# check replication again, becouse it is simple! :)
34-
Run Keyword Replication Works
28+
Log To Console Current Master ${NEW_MASTER.metadata.name}
29+
30+
Log To Console Test Current Master Works
31+
Wait Until Keyword Succeeds 300 sec 5 sec Insert Test Record ${NEW_MASTER.status.pod_ip}
32+
33+
Wait Until Keyword Succeeds 300 sec 5 sec Check Replica Count
34+
Wait Until Keyword Succeeds 300 sec 5 sec Replication Works

0 commit comments

Comments
 (0)