From 863f1ab503d4bf5ea48123dec70cc7bdb079f651 Mon Sep 17 00:00:00 2001 From: Logan Nguyen Date: Wed, 30 Oct 2024 12:02:57 -0500 Subject: [PATCH 1/2] chore: divided hbar limtier tests into different batches Signed-off-by: Logan Nguyen --- .github/workflows/acceptance.yml | 12 +++++++++--- package.json | 3 ++- packages/server/tests/acceptance/hbarLimiter.spec.ts | 6 +++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/acceptance.yml b/.github/workflows/acceptance.yml index 13e68595ed..96afc11c30 100644 --- a/.github/workflows/acceptance.yml +++ b/.github/workflows/acceptance.yml @@ -43,11 +43,17 @@ jobs: testfilter: ratelimiter test_ws_server: true - hbarlimiter: - name: HBar Limiter + hbarlimiter_batch_1: + name: HBar Limiter Batch 1 uses: ./.github/workflows/acceptance-workflow.yml with: - testfilter: hbarlimiter + testfilter: hbarlimiter_batch1 + + hbarlimiter_batch_2: + name: HBar Limiter Batch 2 + uses: ./.github/workflows/acceptance-workflow.yml + with: + testfilter: hbarlimiter_batch2 tokencreate: name: Token Create diff --git a/package.json b/package.json index 90dd6d24db..f6d1eff7f8 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,8 @@ "acceptancetest:api_batch3": "nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@api-batch-3' --exit", "acceptancetest:erc20": "nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@erc20' --exit", "acceptancetest:ratelimiter": "nyc ts-mocha packages/ws-server/tests/acceptance/index.spec.ts -g '@web-socket-ratelimiter' --exit && ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@ratelimiter' --exit", - "acceptancetest:hbarlimiter": "HBAR_RATE_LIMIT_TINYBAR=5000000000 HBAR_RATE_LIMIT_BASIC=1000000000 HBAR_RATE_LIMIT_EXTENDED=1500000000 HBAR_RATE_LIMIT_PRIVILEGED=2000000000 nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@hbarlimiter' --exit", + "acceptancetest:hbarlimiter_batch1": "HBAR_RATE_LIMIT_BASIC=1000000000 HBAR_RATE_LIMIT_EXTENDED=1500000000 HBAR_RATE_LIMIT_PRIVILEGED=2000000000 nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@hbarlimiter-batch1' --exit", + "acceptancetest:hbarlimiter_batch2": "HBAR_RATE_LIMIT_BASIC=1000000000 HBAR_RATE_LIMIT_EXTENDED=1500000000 HBAR_RATE_LIMIT_PRIVILEGED=2000000000 nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@hbarlimiter-batch2' --exit", "acceptancetest:tokencreate": "nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@tokencreate' --exit", "acceptancetest:tokenmanagement": "nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@tokenmanagement' --exit", "acceptancetest:htsprecompilev1": "nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@htsprecompilev1' --exit", diff --git a/packages/server/tests/acceptance/hbarLimiter.spec.ts b/packages/server/tests/acceptance/hbarLimiter.spec.ts index 78d69b2e84..873acf5f64 100644 --- a/packages/server/tests/acceptance/hbarLimiter.spec.ts +++ b/packages/server/tests/acceptance/hbarLimiter.spec.ts @@ -232,7 +232,7 @@ describe('@hbarlimiter HBAR Limiter Acceptance Tests', function () { } }); - describe('Total HBAR Limit', () => { + describe('@hbarlimiter-batch1 Total HBAR Limit', () => { it('should execute "eth_sendRawTransaction" without triggering HBAR rate limit exceeded', async function () { const parentContract = await deployContract(parentContractJson, accounts[0].wallet); @@ -366,7 +366,7 @@ describe('@hbarlimiter HBAR Limiter Acceptance Tests', function () { }); describe('HBAR Rate Limit For Different Spending Plan Tiers', () => { - describe('BASIC Tier', () => { + describe('@hbarlimiter-batch1 BASIC Tier', () => { it('should create a BASIC spending plan for a new user and use the same plan on second transaction and different plan on third transaction from another user', async function () { const parentContract = await deployContract(parentContractJson, accounts[0].wallet); // awaiting for HBAR limiter to finish updating expenses in the background @@ -506,7 +506,7 @@ describe('@hbarlimiter HBAR Limiter Acceptance Tests', function () { }); }); - describe('Preconfigured Tiers', () => { + describe('@hbarlimiter-batch2 Preconfigured Tiers', () => { const createAliasForNonBasicPlans = async (subscriptionTier: SubscriptionTier) => { const aliasAccount = await Utils.createAliasAccount( mirrorNode, From 411dace5c587c1c86343d397f37ec1ca8006c7d5 Mon Sep 17 00:00:00 2001 From: ebadiere Date: Wed, 30 Oct 2024 14:04:26 -0600 Subject: [PATCH 2/2] fix: Removed non-existing entry in the publish results. Signed-off-by: ebadiere --- .github/workflows/acceptance.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/acceptance.yml b/.github/workflows/acceptance.yml index 96afc11c30..dbf564022d 100644 --- a/.github/workflows/acceptance.yml +++ b/.github/workflows/acceptance.yml @@ -121,7 +121,6 @@ jobs: - api_batch_3 - erc20 - ratelimiter - - hbarlimiter - tokencreate - tokenmanagement - htsprecompilev1