8000 Don't apply Checker Framework to tests by andrewaylett · Pull Request #112 · andrewaylett/arc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Don't apply Checker Framework to tests #112

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

Merged
merged 1 commit into from
May 31, 2025
Merged

Conversation

andrewaylett
Copy link
Owner

A big chunk of what we want to test is what happens when we break the invariants -- so we were suppressing a lot of warnings.

A big chunk of what we want to test is what happens when we break the
invariants -- so we were suppressing a lot of warnings.
@Copilot Copilot AI review requested due to automatic review settings May 31, 2025 17:19
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the application of the Checker Framework from the test suite so that invariant-breaking behavior can be tested without interference from checker warnings.

  • Removed Checker Framework imports and annotations from test files.
  • Adjusted assertion helper methods to use static imports from Hamcrest.
  • Updated the build configuration to exclude tests from Checker Framework checks.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/src/test/java/eu/aylett/arc/ArcTest.java Removed Checker Framework annotations and adjusted type annotations.
lib/build.gradle.kts Configured the Checker Framework to exclude tests from validity checks.
Comments suppressed due to low confidence (1)

lib/src/test/java/eu/aylett/arc/ArcTest.java:243

  • The change from checking arc.checkSafety() every 1000 iterations to every 100 iterations increases the frequency of safety checks, which could slow down the tests. Please confirm that this new frequency is intentional given the testing context.
if (i % 100 == 0) {

@@ -81,6 +82,7 @@ configure<CheckerFrameworkExtension> {
"org.checkerframework.common.initializedfields.InitializedFieldsChecker",
"org.checkerframework.checker.lock.LockChecker",
)
excludeTests = true
Copy link
Preview
Copilot AI May 31, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding a brief comment explaining that tests are being excluded from Checker Framework processing, to clarify the reasoning for future maintainers.

Copilot uses AI. Check for mistakes.

Copy link

Looks good. No mutations were possible for these changes.
See https://pitest.org

@andrewaylett andrewaylett enabled auto-merge (rebase) May 31, 2025 17:20
@andrewaylett andrewaylett merged commit 591d7cc into main May 31, 2025
6 checks passed
@andrewaylett andrewaylett deleted the push-pxrpormtzsun branch May 31, 2025 17:20
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.

1 participant
0