appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

chore: Mongo plugin refactor Mongo plugin JUnit TCs

Open amogh2019 opened this issue 3 years ago • 3 comments

Description

  • Fixes #15623
  • Refactoring MongoPlugin junits into smaller files as expected in issue description
  • Separating mongo container init config in MongoTestContainer

Type of change

  • Chore (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Ran all the migrated junits while local dev and verified that all passed as expected.

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes

amogh2019 avatar Oct 17 '22 19:10 amogh2019

@sumitsum @nidhi-nair @Nikhil-Nandagopal @sribalajig @riteshkew
Could you review and let me know of changes, if any?

amogh2019 avatar Oct 17 '22 19:10 amogh2019

@amogh2019 is attempting to deploy a commit to the Appsmith Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Oct 18 '22 16:10 vercel[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
appsmith ✅ Ready (Inspect) Visit Preview Oct 30, 2022 at 4:21PM (UTC)

vercel[bot] avatar Oct 18 '22 16:10 vercel[bot]

@subrata71 @ChandanBalajiBP could you review?

amogh2019 avatar Oct 19 '22 05:10 amogh2019

@sumitsum

amogh2019 avatar Oct 19 '22 05:10 amogh2019

@sumitsum yeh bhi dekh lo please

amogh2019 avatar Oct 20 '22 04:10 amogh2019

@amogh2019 thanks for raising the PR. I will review it soon.

sumitsum avatar Oct 20 '22 05:10 sumitsum

@sumitsum can we please close this before oct?

amogh2019 avatar Oct 26 '22 08:10 amogh2019

@subrata71 Could you review this? Sorry for pushing for this, but hacktoberfest will be ending on 31oct and then this contribution of mine won't be counted

amogh2019 avatar Oct 27 '22 12:10 amogh2019

@amogh2019 apologies for delay, I was OOO. Reviewing it now. Update: reviewed it now, waiting upon response from the author.

sumitsum avatar Oct 27 '22 13:10 sumitsum

@amogh2019 added minor comments otherwise LGTM.

sumitsum avatar Oct 27 '22 14:10 sumitsum

have addressed review comments

amogh2019 avatar Oct 27 '22 15:10 amogh2019

@amogh2019 approved it.

sumitsum avatar Oct 27 '22 16:10 sumitsum

/ok-to-test sha=92f7b84

sumitsum avatar Oct 27 '22 16:10 sumitsum

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3339177730. Workflow: Appsmith External Integration Test Workflow. Commit: 92f7b84. PR: 17633. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17633&runId=3339177730_1

github-actions[bot] avatar Oct 27 '22 16:10 github-actions[bot]

@amogh2019 can you please rebase with release and update the PR ? - since this may improve changes of CI run passing.

sumitsum avatar Oct 27 '22 16:10 sumitsum

Adding test plan approved label since this is only a test case re-distribution into multiple files and hence a successful CI run should suffice cc: @prapullac

sumitsum avatar Oct 27 '22 16:10 sumitsum

Can we merge? @sumitsum

amogh2019 avatar Oct 28 '22 06:10 amogh2019

@amogh2019 can you please pull again from the remote release into your branch (rebase) and update the PR ? Some changes have been pushed in recently to fix CI failures. Also, would it be possible for you to provide my account with push / edit access to your PR branch so that I may do such kind updates if required (in case you are not accessible) ? Ref: https://stackoverflow.com/questions/7244321/how-do-i-update-or-sync-a-forked-repository-on-github

sumitsum avatar Oct 28 '22 10:10 sumitsum

/ok-to-test sha=21b0ac5

sumitsum avatar Oct 28 '22 11:10 sumitsum

/ok-to-test sha=21b0ac5

sumitsum avatar Oct 28 '22 13:10 sumitsum

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3345983530. Workflow: Appsmith External Integration Test Workflow. Commit: 21b0ac5. PR: 17633. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17633&runId=3345983530_1

github-actions[bot] avatar Oct 28 '22 13:10 github-actions[bot]

not sure why ui-test-result is still pending

amogh2019 avatar Oct 28 '22 15:10 amogh2019

@amogh2019 the CI run is showing the following failure, can you please check ? :

Results:
2022-10-28T14:03:38.9985297Z [INFO] 
2022-10-28T14:03:38.9985462Z [ERROR] Failures: 
2022-10-28T14:03:38.9986082Z [ERROR]   MongoPluginFormsTest.testBsonSmartSubstitutionMongoForm expectation "assertNext" failed (expected: onNext(); actual: onError(org.bson.BsonInvalidOperationException: readStartDocument can only be called when CurrentBSONType is DOCUMENT, not when CurrentBSONType is STRING.))
2022-10-28T14:03:38.9986823Z [ERROR]   MongoPluginFormsTest.lambda$testBsonSmartSubstitutionWithMongoTypesWithFindCommand$63:1340 expected: <true> but was: <false>
2022-10-28T14:03:38.9987312Z [ERROR]   MongoPluginFormsTest.lambda$testBsonSmartSubstitution_withBSONValue$1:156 expected: <true> but was: <false>
2022-10-28T14:03:38.9987761Z [ERROR]   MongoPluginFormsTest.lambda$testBsonSmartSubstitution_withEscapedStringValue$3:247 expected: <true> but was: <false>
2022-10-28T14:03:38.9988230Z [ERROR]   MongoPluginFormsTest.lambda$testFormSmartInputFind$26:663 expected: <true> but was: <false>
2022-10-28T14:03:38.9988713Z [ERROR]   MongoPluginFormsTest.lambda$testSmartSubstitutionWithMongoTypesWithRawCommand1$61:1284 expected: <true> but was: <false>
2022-10-28T14:03:38.9989259Z [ERROR]   MongoPluginFormsTest.lambda$testSmartSubstitutionWithObjectIdInSingleQuotes$41:898 expected: <true> but was: <false>

sumitsum avatar Oct 30 '22 11:10 sumitsum

There are some changes that were made after this pr was raised. https://github.com/appsmithorg/appsmith/pull/17429 Pushing updates in a while

amogh2019 avatar Oct 30 '22 16:10 amogh2019

@sumitsum pushed changes. also verified that all mongoPlugin tests are passing in local run.

amogh2019 avatar Oct 30 '22 16:10 amogh2019

@sumitsum can you check and approve? will we close this by today?

amogh2019 avatar Oct 31 '22 08:10 amogh2019

/ok-to-test sha=5eb5aa3

sumitsum avatar Oct 31 '22 10:10 sumitsum

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3360636649. Workflow: Appsmith External Integration Test Workflow. Commit: 5eb5aa3. PR: 17633. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17633&runId=3360636649_1

github-actions[bot] avatar Oct 31 '22 10:10 github-actions[bot]

@amogh2019 I have re-run the CI. The PR can be merged if the CI run passes through.

sumitsum avatar Oct 31 '22 10:10 sumitsum