os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/scripts/Concurrent.script
First public contribution.
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 //! @SYMTestSuiteName PDS-TEF-SQL-SUITE
19 //! @SYMScriptTestEnvironment TEF
20 //! @internalComponent
25 LOAD_SUITE te_SQL_Suite
27 RUN_UTILS MkDir c:\private\
29 START_TESTCASE SYSLIB-SQL-CIT-1748
30 //! @SYMTestCaseID SYSLIB-SQL-CIT-1748
31 //! @SYMTestCaseDesc Dynamically creates a database, adding various data to
32 //! a new table. This is done in eight concurrent threads
33 //! which are deliberately not synchronized. The data should
34 //! successfully write into the table in an undefined order.
35 //! @SYMTestPriority High
36 //! @SYMTestActions See description and the config file.
37 //! @SYMTestExpectedResults
38 //! The data should successfully write into the table in
39 //! an undefined order.
43 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread2
44 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread3
45 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread4
46 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread5
47 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread6
48 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread7
49 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread8
50 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread1
51 END_TESTCASE SYSLIB-SQL-CIT-1748
53 START_TESTCASE SYSLIB-SQL-CIT-1749
54 //! @SYMTestCaseID SYSLIB-SQL-CIT-1749
55 //! @SYMTestCaseDesc Now read back the table CONSECUTIVELY to check the
56 //! table created above has been written correctly.
57 //! @SYMTestPriority High
58 //! @SYMTestActions See description and the config file.
59 //! @SYMTestExpectedResults
60 //! Each step checks the data written by a given thread
61 //! in the test above. This is done consecutively in case
62 //! the check below (which does the check concurrently) fails.
67 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check1
68 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check2
69 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check3
70 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check4
71 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check5
72 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check6
73 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check7
74 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check8
75 END_TESTCASE SYSLIB-SQL-CIT-1749
77 START_TESTCASE SYSLIB-SQL-CIT-1750
78 //! @SYMTestCaseID SYSLIB-SQL-CIT-1750
79 //! @SYMTestCaseDesc Read back the table CONCURRENTLY in sixteen
81 //! @SYMTestPriority High
82 //! @SYMTestActions See description and the config file.
83 //! @SYMTestExpectedResults
84 //! Each step checks the data written by a given thread
85 //! in the test above. There are only eight sets of data
86 //! to check, but there's no harm in doing this more
87 //! than eight times to verify concurrency on read.
92 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check1
93 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check2
94 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check3
95 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check4
96 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check5
97 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check6
98 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check7
99 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check8
100 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check1
101 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check2
102 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check3
103 RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check4
104 END_TESTCASE SYSLIB-SQL-CIT-1750
106 RUN_UTILS DeleteFile c:\Concurrent.db