Skip to content

Fix unittest for read/write lock - #962

Merged
sscargal merged 1 commit into
mainfrom
bugfix/fixUT
Jan 21, 2026
Merged

sscargal merged 1 commit into
mainfrom
bugfix/fixUT

Conversation

@jealous

@jealous jealous commented Jan 20, 2026 •

Copy link
Copy Markdown
Contributor

Purpose of the change

Fix intermittent unit test failures.

Description

fixes intermittent unit test failures for the read/write lock caused by
timing sensitivity. The test criteria are relaxed to reduce dependency
on precise timing and improve overall stability.

Also fixes an issue where the Java path was hard-coded. Since the Java
version may change, the path is now determined dynamically by a script
that locates the extracted Java binary.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g., code style improvements, linting)
  • Documentation update
  • Project Maintenance (updates to build scripts, CI, etc., that do not affect the main project)
  • Security (improves security without changing functionality)

How Has This Been Tested?

  • Unit Test
  • Integration Test
  • End-to-end Test
  • Test Script (please provide)
  • Manual verification (list step-by-step instructions)

Checklist

  • I have signed the commit(s) within this pull request
  • My code follows the style guidelines of this project (See STYLE_GUIDE.md)
  • I have performed a self-review of my own code
  • I have commented my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • Confirmed all checks passed
  • Contributor has signed the commit(s)
  • Reviewed the code
  • Run, Tested, and Verified the change(s) work as expected

@jealous
jealous requested a review from Copilot January 20, 2026 19:32
@jealous jealous self-assigned this Jan 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 fixes intermittent unit test failures in the read/write lock tests by adjusting timing thresholds to be less sensitive to execution timing variations.

Changes:

  • Relaxed minimum duration assertion from 0.2s to 0.15s in writer/reader sequencing test
  • Extended maximum duration assertion from 0.4s to 0.45s in lock collision test

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

fixes intermittent unit test failures for the read/write lock caused by
timing sensitivity. The test criteria are relaxed to reduce dependency
on precise timing and improve overall stability.

Also fix the issue that the java path should not be a fixed string
because the latest java version will change.  Use script to dynamically
locate the path of the extracted java binary.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jealous
jealous requested a review from a team January 20, 2026 21:42
@sscargal
sscargal merged commit 86aa875 into main Jan 21, 2026
48 checks passed
@sscargal
sscargal deleted the bugfix/fixUT branch January 21, 2026 02:31
o-love pushed a commit that referenced this pull request Jan 23, 2026
fixes intermittent unit test failures for the read/write lock caused by
timing sensitivity. The test criteria are relaxed to reduce dependency
on precise timing and improve overall stability.

Also fix the issue that the java path should not be a fixed string
because the latest java version will change.  Use script to dynamically
locate the path of the extracted java binary.
SarahScargall pushed a commit to SarahScargall/MemMachine that referenced this pull request Jan 29, 2026
fixes intermittent unit test failures for the read/write lock caused by
timing sensitivity. The test criteria are relaxed to reduce dependency
on precise timing and improve overall stability.

Also fix the issue that the java path should not be a fixed string
because the latest java version will change.  Use script to dynamically
locate the path of the extracted java binary.
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.

5 participants