-
Notifications
You must be signed in to change notification settings - Fork 371
Added tests for edge cases #179
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
Conversation
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class VanillaCpuLayoutPropertiesParseTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should cover Ryzen and Epyc here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CPU model here is illustrative, we could change the names of the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, the properties files are cpuinfo dumps IIRC - it would prove that the parser handles the latest layouts (I assume it should just work)
… identifier on lock failure
…e-fix # Conflicts: # affinity/src/test/java/net/openhft/affinity/AffinityLockTest.java
Java9 fixes
AffinityLock.acquireCore should lock/unlock all cpus ie 2 when hypert…
This patch adds 10 new JUnit tests (+3 CPU-layout fixtures) to harden the Java Thread Affinity project against edge cases.
It touches only the
src/test
tree – no production code is modified.AffinityLockDumpLocksTest
dumpLocks()
lists all threads currently holding locks.AffinityLockReleaseTest
AffinityLock.release()
restores the mask toBASE_AFFINITY
.AffinityResetToBaseAffinityTest
Affinity.resetToBaseAffinity()
resets the calling thread correctly.AffinityThreadFactoryTest
AffinityThreadFactory
each bind to a distinct CPU (Linux only).CpuInfoLayoutMappingTest
/proc/cpuinfo
into a correct logical-to-physical map.UtilitiesTest
Utilities.toHexString
andtoBinaryString
with high/empty bits.VanillaCpuLayoutPropertiesParseTest
.properties
layouts (i3, dual-Xeon, dual-E5405) and validates counts.(Three helper classes extend
BaseAffinityTest
to reuse temporary-dir handling and Linux checks.)Improves confidence in affinity-lock lifecycle, CPU-layout parsing, and utility helpers.