Package org.openbravo.test.dal
Class ADCachedMultiThreadTest
- java.lang.Object
-
- org.openbravo.test.base.MockableBaseTest
-
- org.openbravo.test.base.OBBaseTest
-
- org.openbravo.test.dal.ADCachedMultiThreadTest
-
public class ADCachedMultiThreadTest extends OBBaseTest
Test cases to verify multiple ApplicationDictionaryCachedStructures behavior when working concurrently with multiple threads.- Author:
- alostale
-
-
Field Summary
-
Fields inherited from class org.openbravo.test.base.OBBaseTest
DOLLAR, DOLLAR_ID, EURO, EURO_ID, QA_TEST_ADMIN_USER_ID, QA_TEST_CLIENT_ID, QA_TEST_ORG_ID, TEST_BP_CATEGORY_ID, TEST_CLIENT_ID, TEST_INVOICE_ID, TEST_LOCATION_ID, TEST_ORDER_ID, TEST_ORG_ID, TEST_ORG_TREE, TEST_PRODUCT_ID, TEST_ROLE_ID, TEST_US_ORG_ID, TEST_USER_ID, TEST_WAREHOUSE_ID, TEST2_USER_ID, userIds, watchFailures
-
-
Constructor Summary
Constructors Constructor Description ADCachedMultiThreadTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testMultiCallsCache()
This test creates multiple threads invoking all public methods in ApplicationDictionaryCachedStructures for the same tab.void
testMultiCallsNoCache()
This test creates multiple threads invoking all public methods in ApplicationDictionaryCachedStructures for the same tab.void
testParentTabCache()
This test executes using cache: Thread 1 gets tab from ApplicationDictionaryCachedStructures and finishes Thread 2 gets same tab and gets its parent Verifies tab object is completely initialized by Thread 1 so Thread 2 can work with itvoid
testParentTabNoCache()
This test executes without using cache: Thread 1 gets tab from ApplicationDictionaryCachedStructures and finishes Thread 2 gets same tab and gets its parent Verifies tab object is completely initialized by Thread 1 so Thread 2 can work with itvoid
testPropertyColumn()
Property columns is an especial case because they can link to a column in a different table which needs to be completely initialized within current tab-
Methods inherited from class org.openbravo.test.base.OBBaseTest
addReadWriteAccess, classSetUp, commitTransaction, count, getConnectionProvider, getOneInstance, getRandomUser, getTestLogAppender, initializeDalLayer, initializeDisabledTestCases, initializeTestLogAppender, isErrorOccured, reportException, rollback, setLogStackTraces, setQAAdminContext, setSystemAdministratorContext, setTestAdminContext, setTestLogAppenderLevel, setTestUserContext, setUp, setUserContext, shouldMockServletContext, staticInitializeDalLayer, testDone
-
Methods inherited from class org.openbravo.test.base.MockableBaseTest
mockStatic
-
-
-
-
Method Detail
-
testParentTabCache
public void testParentTabCache() throws Exception
This test executes using cache:- Thread 1 gets tab from ApplicationDictionaryCachedStructures and finishes
- Thread 2 gets same tab and gets its parent
- Throws:
Exception
-
testParentTabNoCache
public void testParentTabNoCache() throws Exception
This test executes without using cache:- Thread 1 gets tab from ApplicationDictionaryCachedStructures and finishes
- Thread 2 gets same tab and gets its parent
- Throws:
Exception
-
testMultiCallsCache
public void testMultiCallsCache() throws Exception
This test creates multiple threads invoking all public methods in ApplicationDictionaryCachedStructures for the same tab. It is executedTEST_EXECUTIONS
number of times to simulate high traffic in the same session. Using cache- Throws:
Exception
-
testMultiCallsNoCache
public void testMultiCallsNoCache() throws Exception
This test creates multiple threads invoking all public methods in ApplicationDictionaryCachedStructures for the same tab. It is executedTEST_EXECUTIONS
number of times to simulate high traffic in the same session. Not using cache- Throws:
Exception
-
-