Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


Hi,

I'm reenabling some disabled JUnitTests in dbaccess/JunitTest_dbaccess_complex.mk
And finding (and fixing) several bugs on the way.

In particular, in dbaccess/qa/complex/dbaccess/RowSet.java:

    void testConcurrentAccess(XResultSet _resultSet)
    {
            (...)
            for (int i = 0; i < numberOfThreads; ++i)
            {
                threads[i] = new Thread(new ResultSetMovementStress(createClone(), i));
                System.out.println("starting thread " + (i + 1) + " of " + (numberOfThreads));
                threads[i].start();
            }

            for (int i = 0; i < numberOfThreads; ++i)
            {
                threads[i].join();
            }
    }


My problem is that the launched threads fail in this way:

        public void run()
        {
            try
            {
            }
            catch (Exception e)
            {
                fail("ResultSetMovementStress(" + m_id + ") failed " + e);
            }
       }


But the test as a whole still succeeds! The subthread failure is just
ignored.

I fixed the underlying bug, but I would like to fix the test so that
it fails when one of the threads fails. I tried to not catch the
Exception, but that does not help. (I noticed the thread failure by
looking at workdir/JunitTest/dbaccess_complex/done.log )

How do I fix this?

Thanks in advance for any help,

-- 
Lionel

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.