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

Enable asserts in the tests #4074

Merged
merged 40 commits into from
Jan 26, 2023
Merged

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Jan 24, 2023

Pull Request Description

Enso unit tests were running without -ea check enabled and as such various invariant checks in Truffle code were not executed. Let's turn the -ea flag on and fix all the code misbehaves.

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the
    Scala,
    Java,
    and
    Rust
    style guides.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed: Enso GUI was tested when built using BOTH
      ./run ide build and ./run ide watch.

@JaroslavTulach JaroslavTulach added the CI: No changelog needed Do not require a changelog entry for this PR. label Jan 24, 2023
@JaroslavTulach JaroslavTulach self-assigned this Jan 24, 2023
@JaroslavTulach JaroslavTulach force-pushed the wip/jtulach/EnableAsserts_183546453 branch from 0e6fb07 to 5804b28 Compare January 24, 2023 06:17
@JaroslavTulach JaroslavTulach added CI: Ready to merge This PR is eligible for automatic merge labels Jan 26, 2023
Copy link
Member

@Akirathan Akirathan left a comment

Choose a reason for hiding this comment

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

I don't understand the reason for another assert hack in options in the context. AFAIK, all the option keys should already be present in the context, unless there is something wrong with the initialization. I have attached comments on appropriate places.

interpreterContext.executionService.getContext.getEnvironment.getOptions
.get(RuntimeServerInfo.JOB_PARALLELISM_KEY)
.intValue()
private val jobParallelism = context.getJobParallelism
Copy link
Member

Choose a reason for hiding this comment

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

JOB_PARALLELISM_KEY is registered in RuntimeServerInstrument. This option descriptor key should be contained in the context. Unless there is something wrong with the initialization of RuntimeServerInstrument?

Copy link
Collaborator

@hubertp hubertp left a comment

Choose a reason for hiding this comment

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

Mostly minor nits

@JaroslavTulach JaroslavTulach added the CI: Clean build required CI runners will be cleaned before and after this PR is built. label Jan 26, 2023
Copy link
Member

@radeusgd radeusgd left a comment

Choose a reason for hiding this comment

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

I'm very glad that we are moving towards testing assertions on the CI 😁

Copy link
Collaborator

@hubertp hubertp left a comment

Choose a reason for hiding this comment

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

I don't agree with some of the style changes introduced here but at the same time I'm not going to be blocking this PR only because of that, considering that we didn't have those checks working for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Clean build required CI runners will be cleaned before and after this PR is built. CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants