Skip to content

Address two intermittent test failures when capturing output#3560

Merged
jsiirola merged 5 commits intoPyomo:mainfrom
jsiirola:tee-test-fixes
Apr 14, 2025
Merged

Address two intermittent test failures when capturing output#3560
jsiirola merged 5 commits intoPyomo:mainfrom
jsiirola:tee-test-fixes

Conversation

@jsiirola
Copy link
Copy Markdown
Member

Fixes # .

Summary/Motivation:

This PR attempts to resolve two intermittent test failures:

  • On OSX (usually Python 3.10), we occasionally get a solver test failing with "I/O operation on a closed file". This PR removes the flush() that can trigger this error. The streams that were being flushed are already being flushed just before reaching this code (rendering this call redundant).
  • On PyPy, we see a test failure caused by what looks like an incomplete GC run. This adds short delays between calls to the GC to hopefully resolve the problem.

Changes proposed in this PR:

  • See above

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@jsiirola jsiirola merged commit c1625b9 into Pyomo:main Apr 14, 2025
35 checks passed
@jsiirola jsiirola deleted the tee-test-fixes branch April 14, 2025 14:01
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