Skip to content

Conversation

@JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Nov 12, 2025

Pull Request Description

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • All code follows the
    Scala,
    Java,
  • Unit tests have been written where possible.

@JaroslavTulach JaroslavTulach self-assigned this Nov 12, 2025
@JaroslavTulach JaroslavTulach added the CI: No changelog needed Do not require a changelog entry for this PR. label Nov 12, 2025
.dependsOn(`poi-wrapper`)
.dependsOn(`std-base` % "provided")

lazy val `std-tests` = project
Copy link
Member Author

@JaroslavTulach JaroslavTulach Nov 12, 2025

Choose a reason for hiding this comment

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

@jdunkerley, it is possible to run these tests quickly:

sbt:enso> std-tests/clean
sbt:enso> std-tests/test
[info] Test run org.enso.base.polyglot.tests.EnsoMetaTest finished: 1 total, 3.595s
[info] Passed: Total 1, Failed 0, Errors 0, Passed 1

e.g. the test finished in less than four seconds (or in eleven seconds on CI).

Copy link
Member Author

Choose a reason for hiding this comment

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

  • originally I wanted to add these tests into std-table
  • but there is recursive project dependency
  • as test-utils depend on std-table (to have Enso distribution fully built)
  • and making std-table depend on test-utils was ... complicated...


@Test
public void loadErrorType() {
var errorType = EnsoMeta.getType("Standard.Base.Error", "Error");
Copy link
Member Author

Choose a reason for hiding this comment

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

To debug:

  • but breakpoint on line 23
  • let your IDE listen to port 5005
  • invoke following in the sbt
sbt:enso> project std-tests
sbt:std-tests> withDebug --debugger testOnly -- *EnsoMetaTest
obrazek

@JaroslavTulach JaroslavTulach added the CI: Keep up to date Automatically update this PR to the latest develop. label Nov 13, 2025
@JaroslavTulach JaroslavTulach removed the CI: Keep up to date Automatically update this PR to the latest develop. label Nov 13, 2025
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.

What is the difference between std-tests and runtime-integration-tests? In runtime-integration-tests, we are already doing from Standard.Base import all, for example in VectorSortTest. Why yet another project?

EDIT: std-tests uses stuff from std-base. That is the difference.

@JaroslavTulach
Copy link
Member Author

JaroslavTulach commented Nov 14, 2025

What is the difference between std-tests and runtime-integration-tests? In runtime-integration-tests, we are already doing from Standard.Base import all, for example in VectorSortTest. Why yet another project?
std-tests uses stuff from std-base. That is the difference.

  • The difference is mostly psychological
  • When talking to @jdunkerley I realized the library guys never execute runtime-integration-tests
    • very likely they don't consider those tests to be "their" business
    • they had no idea of ContextUtils and the possibilities it opens when JUnit testing Enso code
  • as a result of that they were putting artificial constrains on their code in std-base, std-table, etc.
  • thus I decided to demonstrate how to write JUnit tests in a std-bits/* namespace
  • e.g. in a space that they are not afraid to use

Thus your question is correct, @Akirathan. You, me would put such kind of a test into runtime-integration-tests. Duplicating the infrastructure in std-bits/std-tests has no technical reasons, but it will hopefully remove the psychological barrier for the libraries team to write such tests as well.

Co-authored-by: Hubert P <hubert.plociniczak@gmail.com>
@JaroslavTulach
Copy link
Member Author

Copy link
Member

@jdunkerley jdunkerley left a comment

Choose a reason for hiding this comment

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

Happy with this approach for when we need to test the back and forth.

@JaroslavTulach JaroslavTulach added the CI: Ready to merge This PR is eligible for automatic merge label Nov 27, 2025
@mergify mergify bot merged commit 185a115 into develop Nov 27, 2025
74 checks passed
@mergify mergify bot deleted the wip/jtulach/EnsoMetaTest14040 branch November 27, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

5 participants