os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/scripts/Concurrent.script
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/scripts/Concurrent.script	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,107 @@
     1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// @file
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +//! @SYMTestSuiteName PDS-TEF-SQL-SUITE
    1.22 +//! @SYMScriptTestEnvironment TEF
    1.23 +//! @internalComponent
    1.24 +//! @test
    1.25 +
    1.26 +PRINT Run SQL Tests
    1.27 +
    1.28 +LOAD_SUITE te_SQL_Suite
    1.29 +
    1.30 +RUN_UTILS MkDir c:\private\
    1.31 +
    1.32 +START_TESTCASE SYSLIB-SQL-CIT-1748
    1.33 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1748
    1.34 +//! @SYMTestCaseDesc  Dynamically creates a database, adding various data to
    1.35 +//!                  a new table. This is done in eight concurrent threads
    1.36 +//!                  which are deliberately not synchronized. The data should
    1.37 +//!                  successfully write into the table in an undefined order.
    1.38 +//! @SYMTestPriority  High
    1.39 +//! @SYMTestActions   See description and the config file.
    1.40 +//! @SYMTestExpectedResults
    1.41 +//!                  The data should successfully write into the table in
    1.42 +//!                  an undefined order.
    1.43 +//! @SYMREQ           REQ5793
    1.44 +
    1.45 +CONCURRENT
    1.46 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread2
    1.47 +  	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread3
    1.48 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread4
    1.49 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread5
    1.50 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread6
    1.51 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread7
    1.52 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread8
    1.53 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Thread1
    1.54 +END_TESTCASE SYSLIB-SQL-CIT-1748
    1.55 +
    1.56 +START_TESTCASE SYSLIB-SQL-CIT-1749
    1.57 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1749
    1.58 +//! @SYMTestCaseDesc  Now read back the table CONSECUTIVELY to check the
    1.59 +//!                  table created above has been written correctly.
    1.60 +//! @SYMTestPriority  High
    1.61 +//! @SYMTestActions   See description and the config file.
    1.62 +//! @SYMTestExpectedResults
    1.63 +//!                  Each step checks the data written by a given thread
    1.64 +//!                  in the test above. This is done consecutively in case
    1.65 +//!                  the check below (which does the check concurrently) fails.
    1.66 +//!                  
    1.67 +//! @SYMREQ           REQ5793
    1.68 +
    1.69 +CONSECUTIVE
    1.70 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check1
    1.71 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check2
    1.72 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check3
    1.73 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check4
    1.74 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check5
    1.75 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check6
    1.76 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check7
    1.77 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check8
    1.78 +END_TESTCASE SYSLIB-SQL-CIT-1749
    1.79 +
    1.80 +START_TESTCASE SYSLIB-SQL-CIT-1750
    1.81 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1750
    1.82 +//! @SYMTestCaseDesc  Read back the table CONCURRENTLY in sixteen
    1.83 +//!                  threads.
    1.84 +//! @SYMTestPriority  High
    1.85 +//! @SYMTestActions   See description and the config file.
    1.86 +//! @SYMTestExpectedResults
    1.87 +//!                  Each step checks the data written by a given thread
    1.88 +//!                  in the test above. There are only eight sets of data
    1.89 +//!                  to check, but there's no harm in doing this more
    1.90 +//!                  than eight times to verify concurrency on read.
    1.91 +//!
    1.92 +//! @SYMREQ           REQ5793
    1.93 +
    1.94 +CONCURRENT
    1.95 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check1
    1.96 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check2
    1.97 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check3
    1.98 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check4
    1.99 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check5
   1.100 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check6
   1.101 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check7
   1.102 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check8
   1.103 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check1
   1.104 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check2
   1.105 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check3
   1.106 +	RUN_TEST_STEP 1000 te_SQL_Suite CSQLCDT z:\TEF_SQL\Concurrent.ini Check4
   1.107 +END_TESTCASE SYSLIB-SQL-CIT-1750
   1.108 +
   1.109 +RUN_UTILS DeleteFile c:\Concurrent.db
   1.110 +