Skip to content

Commit

Permalink
refactor(negative): reorganize stress cpu/mem cases
Browse files Browse the repository at this point in the history
Signed-off-by: Chin-Ya Huang <[email protected]>
  • Loading branch information
c3y1huang committed Nov 3, 2023
1 parent c8e587e commit 614a5b6
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 26 deletions.
4 changes: 2 additions & 2 deletions e2e/keywords/node.resource
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ Restart cluster
wait_for_workload_pod_stable ${statefulset}
END

During replica rebuilding, stress volume node cpu
Stress volume node cpu
stress_node_cpu_by_volume ${volume_name}

During replica rebuilding, stress volume node memory
Stress volume node memory
stress_node_memory_by_volume ${volume_name}
24 changes: 0 additions & 24 deletions e2e/tests/replica_rebuilding.robot
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,3 @@ Reboot Replica Node While Replica Rebuilding
Then Wait until replica on replica node rebuilt
And Check data is intact
END

Stress Volume Node CPU While Replica Rebuilding
Given Create a volume with 5 GB and 3 replicas
And Write data to the volume

FOR ${i} IN RANGE ${LOOP_COUNT}
When Delete replica on volume node to trigger replica rebuilding
And During replica rebuilding, stress volume node cpu

Then Wait until replica on volume node rebuilt
And Check data is intact
END

Stress Volume Node Memory While Replica Rebuilding
Given Create a volume with 5 GB and 3 replicas
And Write data to the volume

FOR ${i} IN RANGE ${LOOP_COUNT}
When Delete replica on volume node to trigger replica rebuilding
And During replica rebuilding, stress volume node memory

Then Wait until replica on volume node rebuilt
And Check data is intact
END
27 changes: 27 additions & 0 deletions e2e/tests/stress_cpu.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
*** Settings ***
Documentation Negative Test Cases
Resource ../keywords/node.resource
Resource ../keywords/volume.resource
Resource ../keywords/common.resource

Test Setup Set test environment
Test Teardown Cleanup test resources

*** Variables ***
${LOOP_COUNT} 1
${RETRY_COUNT} 300
${RETRY_INTERVAL} 1

*** Test Cases ***

Stress Volume Node CPU When Replica Is Rebuilding
Given Create a volume with 5 GB and 3 replicas
And Write data to the volume

FOR ${i} IN RANGE ${LOOP_COUNT}
When Delete replica on volume node to trigger replica rebuilding
And Stress volume node cpu

Then Wait until replica on volume node rebuilt
And Check data is intact
END
27 changes: 27 additions & 0 deletions e2e/tests/stress_memory.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
*** Settings ***
Documentation Negative Test Cases
Resource ../keywords/node.resource
Resource ../keywords/volume.resource
Resource ../keywords/common.resource

Test Setup Set test environment
Test Teardown Cleanup test resources

*** Variables ***
${LOOP_COUNT} 1
${RETRY_COUNT} 300
${RETRY_INTERVAL} 1

*** Test Cases ***

Stress Volume Node Memory When Replica Is Rebuilding
Given Create a volume with 5 GB and 3 replicas
And Write data to the volume

FOR ${i} IN RANGE ${LOOP_COUNT}
When Delete replica on volume node to trigger replica rebuilding
And Stress volume node memory

Then Wait until replica on volume node rebuilt
And Check data is intact
END

0 comments on commit 614a5b6

Please sign in to comment.