Announcement Announcement Module
No announcement yet.
Avoiding synchronization within Spring tests Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Avoiding synchronization within Spring tests

    I have a collection of integration tests running with SpringJUnit4ClassRunner. I'm trying to run these in parallel using maven surefire. However, I have noticed that the the code is blocking before entering the synchronized block in CacheAwareContextLoaderDelegate.loadContext().

    Is there a way to bypass this cache? I tried doing this, but it seems like there is more shared state than just the cache itself. Or could the synchronization be made more fine-grained by somehow synchronizing on the map key rather than the entire map?