Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8968509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:27:51+00:00 2026-06-15T17:27:51+00:00

When running my test, it hangs at the call to method(). Am I doing

  • 0

When running my test, it hangs at the call to method(). Am I doing something wrong? Help!

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"beans.xml"})
@Transactional(rollbackFor = Exception.class)
public class Test {
    @Test
    public void test() {
        itemUnderTestDao.method();
        // ...
    }
}

public class ItemUnderTestDao {
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public void method() {
        // ...
    }
}

Forget the above code. I have now uploaded an Eclipse project (excluding dependencies like spring) at http://www44.zippyshare.com/v/46865082/file.html. All input on how to get the test to pass is really appreciated! The test pass if I have two sqlite databases and two dataSources…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:27:52+00:00Added an answer on June 15, 2026 at 5:27 pm

    As mrembisz said you are trying to get 2 connections at the same time/thread.

    1. For test itself, which would exist for a duration of the test
    2. For a method call, which would exist for duration of the call.

    I encountered the same thing in a little bit different circumstances.

    2 ways you can fix this:

    1. Change propagation to REQUIRED, this way you would reuse Connection that test originally acquired.
    2. Increase pool size, but keep in mind, that you need to consider max number of simultanious updates, roughly maxThreadPoolSize >= (maxSimultaniousUpdates + 1) + (min size for other activities) (If you have at list 1 pending connection, eventually all pending operations would complete). Othrewise this would reappear in production.

    First solution seems to me better one, ofcourse if it does not harm your logic 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking to implement a continuous unit test running system, something I have
While running tests test runner hangs up on next code "main" prio=10 tid=0x097f4c00 nid=0x7d6a
I'm running test application on Heroku(don't pay for it). Maybe I miss something, but
When running mvn test maven won't run all Test Classes. When I explicitly provide
When running py.test using a plugin that loads xmlrpclib the test run fails with:
When running a test using the Tornado AsyncHTTPTestCase I'm getting a stack trace that
We are running a test automation suite and would like to prevent this message
I'm running a test, and found that the file doesn't actually get written until
We get the following error when running at test: ContextSwitchDeadlock was detected Message: The
I've gotten a simple WatiN web test running on my dev environment and am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.