Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the test file in dotenv.rs #1651

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Fixed the test file in dotenv.rs #1651

wants to merge 7 commits into from

Conversation

KoxyG
Copy link

@KoxyG KoxyG commented Oct 4, 2024

What

Test files no longer needs sleep is no longer needed for test cases to pass.

Copy link
Member

@leighmcculloch leighmcculloch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @KoxyG! Thanks for contributing.

Can you make the following changes to the PR so we can merge?

  • Remove the refactors and minimise the change to the minimal changes required to fix the problem. Most of this PR seems to be a refactor, moving code around and not changing the functionality, which is unnecessary.

  • Remove the four dependencies added that are not used.

  • Re-add the test that got removed. We need to fix the problem without removing the test.

  • Undo the change to the contract address.

cmd/crates/soroban-test/Cargo.toml Outdated Show resolved Hide resolved
cmd/crates/soroban-test/tests/it/integration/dotenv.rs Outdated Show resolved Hide resolved
@willemneal
Copy link
Member

@leighmcculloch This issue was solved in the Loam repo by implementing what you suggested; adding some random bits to a Wasm binary so that each test has a unique contract. See https://github.com/loambuild/loam/pull/88/files#diff-0e64c49f07fd665cae565b5863129f04cebefe45e23d9afd9125411cc4dbd08cR74-R99

@KoxyG
Copy link
Author

KoxyG commented Oct 4, 2024

Hi @leighmcculloch i have made the neccessary changes. Kindly help review

@KoxyG
Copy link
Author

KoxyG commented Oct 5, 2024

@janewang kindly pls help review. This issue is referenced to this .

#1231 from ODhack

@sagpatil
Copy link

sagpatil commented Dec 3, 2024

we will be closing this out if there is no activity for a week

@KoxyG
Copy link
Author

KoxyG commented Dec 4, 2024

we will be closing this out if there is no activity for a week

It's still under review. I haven't been updated about the progress of this by the reviewers.

Copy link
Member

@leighmcculloch leighmcculloch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm if the sleeps are no longer needed. I've approved the builds to run to see.

One question inline below.

Comment on lines +53 to +67
let result = e
.new_assert_cmd("contract")
.env(
"SOROBAN_CONTRACT_ID",
"CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4",
"CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4",
)
.arg("invoke")
.arg("--id")
.arg(id)
.arg("--")
.arg("hello")
.arg("--world=world")
.assert()
.stdout("[\"Hello\",\"world\"]\n");
.assert();

result.stdout("[\"Hello\",\"world\"]\n").success();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do these lines need to change? I see that a .success() has been added, and the stdout has been moved to after the .assert(). What's the significance of those changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

4 participants