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

Improve test for JVM intrinsics: #2642

Merged
merged 1 commit into from
Apr 18, 2024
Merged

Improve test for JVM intrinsics: #2642

merged 1 commit into from
Apr 18, 2024

Conversation

sandwwraith
Copy link
Member

Old one used time-based approach. It was a good indicator, but in rare circumstances it may have been flaky and produced incorrect results. Flaky time-based tests are problematic for large builds, such as Kotlin's Aggregate build.

New approach is based on cache presence and should not give incorrect results.

See also #KTI-1726

Old one used time-based approach. It was a good indicator, but in rare circumstances it may have been flaky and produced incorrect results. Flaky time-based tests are problematic for large builds, such as Kotlin's Aggregate build.

New approach is based on cache presence and should not give incorrect results.

See also #KTI-1726
@@ -43,4 +43,21 @@ class CachingTest {

assertEquals(1, factoryCalled)
}

@Serializable
class Target
Copy link
Contributor

Choose a reason for hiding this comment

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

There are no other branches of intrinsic, like value classes, e.t.c?

It may not be enough to check only the intrinsic of a regular class class Target

Copy link
Member Author

@sandwwraith sandwwraith Apr 18, 2024

Choose a reason for hiding this comment

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

There aren't any branches depending on class type. Either intrinsics are enabled and replacing serializer<T>() with something, or they are not. We have different branches for caches though (parametrized vs non-parametrized), but that is not what being tested here.

@sandwwraith sandwwraith merged commit da020f9 into dev Apr 18, 2024
3 of 4 checks passed
@sandwwraith sandwwraith deleted the replace-intrinsic-test branch April 18, 2024 17:40
@shanshin shanshin assigned sandwwraith and unassigned shanshin Apr 22, 2024
sandwwraith added a commit that referenced this pull request Apr 22, 2024
that should be part of da020f9 (#2642) commit. See that commit message for reasoning.
sandwwraith added a commit that referenced this pull request May 6, 2024
that should be part of da020f9 (#2642) commit. See that commit message for reasoning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants