Skip to content

Commit

Permalink
only apply pod chaos
Browse files Browse the repository at this point in the history
  • Loading branch information
AnieeG committed Oct 22, 2023
1 parent 04314de commit 1d49f9c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 31 deletions.
14 changes: 7 additions & 7 deletions integration-tests/ccip-tests/load-test.env
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ export CCIP_TESTS_ON_EXISTING_DEPLOYMENT=False
export SELECTED_NETWORKS="SIMULATED,SIMULATED_1,SIMULATED_2"
export CCIP_NETWORK_PAIRS=""

export CCIP_NO_OF_NETWORKS=18
export CCIP_NO_OF_ROUTERS_PER_PAIR=2
export CCIP_NO_OF_NETWORKS=2
export CCIP_NO_OF_ROUTERS_PER_PAIR=1

# The load will be triggered as <CCIP_LOAD_TEST_RATE> per <CCIP_LOAD_TEST_RATEUNIT>
# for <CCIP_TEST_DURATION>. Example for following: 1 request per 10s for 1h
export CCIP_LOAD_TEST_RATEUNIT=10s
export CCIP_LOAD_TEST_RATE=1
export CCIP_TEST_DURATION=2h
export CCIP_TEST_DURATION=15m

# if CCIP_KEEP_ENV_ALIVE is set to true, the env will not be destroyed after the test.
export CCIP_KEEP_ENV_ALIVE=True
Expand All @@ -39,8 +39,8 @@ export CCIP_TRANSFER_AMOUNT_PER_TOKEN=1
export CCIP_DEPLOY_BLOCKSCOUT=False

# if chaos is run with load
export CCIP_CHAOS_DURATION=20m
export CCIP_WAIT_BETWEEN_NEXT_CHAOS=5m
export CCIP_CHAOS_DURATION=5m
export CCIP_WAIT_BETWEEN_NEXT_CHAOS=30s

# remote runner resource requirements
export RR_MEM=16Gi
Expand All @@ -50,8 +50,8 @@ export RR_CPU=4
export CCIP_DB_MEM=6Gi
export CCIP_DB_CPU=2
export CCIP_DB_ARGS="shared_buffers=2GB,effective_cache_size=4GB,work_mem=128MB"
export CCIP_MAX_OPEN_CONNECTIONS=40
export CCIP_MAX_IDLE_CONNECTIONS=20
export CCIP_MAX_OPEN_CONNECTIONS=50
export CCIP_MAX_IDLE_CONNECTIONS=50

# node resource requirements
export CCIP_NODE_MEM=8Gi
Expand Down
25 changes: 1 addition & 24 deletions integration-tests/ccip-tests/load/ccip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func TestLoadCCIPStableRequestTriggeringWithNetworkChaos(t *testing.T) {
// the pod chaos is applied at a regular interval throughout the test duration
// this test needs to be run for a longer duration to see the effects of pod chaos
// in this test commit and execution are set up to be on the same node
func TestLoadCCIPStableWithPodChaosAndNetworkChaos(t *testing.T) {
func TestLoadCCIPStableWithPodChaos(t *testing.T) {
t.Parallel()

inputs := []ChaosConfig{
Expand Down Expand Up @@ -154,30 +154,7 @@ func TestLoadCCIPStableWithPodChaosAndNetworkChaos(t *testing.T) {
require.NotNil(t, testEnv)
require.NotNil(t, testEnv.K8Env)

// apply network chaos so that chainlink's RPC calls are affected by some network delay for the duration of the test
var gethNetworksLabels []string
for _, net := range testArgs.TestCfg.SelectedNetworks {
gethNetworksLabels = append(gethNetworksLabels, actions.GethLabel(net.Name))
}
testEnv.ChaosLabelForAllGeth(t, gethNetworksLabels)
chaosId, err := testEnv.K8Env.Chaos.Run(
chaos.NewNetworkLatency(
testEnv.K8Env.Cfg.Namespace, &chaos.Props{
FromLabels: &map[string]*string{"geth": a.Str(actions.ChaosGroupCCIPGeth)},
ToLabels: &map[string]*string{"app": a.Str("chainlink-0")},
DurationStr: testArgs.TestCfg.TestDuration.String(),
Delay: "300ms",
}))
require.NoError(t, err)

t.Cleanup(func() {
if chaosId != "" {
require.NoError(t, testEnv.K8Env.Chaos.Stop(chaosId))
}
})
testArgs.TriggerLoad()

// apply pod chaos to the CL nodes asynchronously and sequentially while the load is running
testArgs.ApplyChaos()
testArgs.Wait()
}
Expand Down

0 comments on commit 1d49f9c

Please sign in to comment.