sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // @file sl@0: // sl@0: // sl@0: sl@0: //! @SYMTestSuiteName PDS-TEF-SQL-SUITE sl@0: //! @SYMScriptTestEnvironment TEF sl@0: //! @internalComponent sl@0: //! @test sl@0: sl@0: PRINT Run SQL Tests sl@0: sl@0: LOAD_SUITE te_SQL_Suite sl@0: sl@0: START_TESTCASE SYSLIB-SQL-CIT-1848 sl@0: //! @SYMTestCaseID SYSLIB-SQL-CIT-1848 sl@0: //! @SYMTestCaseDesc Tests basic transaction behaviour and a simple level sl@0: //! of concurrency. A single record is added to a table. sl@0: //! Then, within a transaction three more are added. sl@0: //! At this point two concurrent threads (one ESerializable, sl@0: //! one EReadUncommitted) check the content of the table. sl@0: //! After checking the transaction is rolled back. sl@0: //! (8-bit/Asynchronous variant) sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions See description and the config file. sl@0: //! @SYMTestExpectedResults sl@0: //! The ESerializable thread is unable to read the table sl@0: //! because it is locked. The EReadUncommitted read it fine. sl@0: //! @SYMREQ REQ5792 sl@0: //! REQ5793 sl@0: sl@0: CONCURRENT sl@0: RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini Thread2 sl@0: RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini Thread3 sl@0: RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini Thread1 sl@0: END_TESTCASE SYSLIB-SQL-CIT-1848 sl@0: sl@0: START_TESTCASE SYSLIB-SQL-CIT-1849 sl@0: //! @SYMTestCaseID SYSLIB-SQL-CIT-1849 sl@0: //! @SYMTestCaseDesc Verifies the rollback on the last test performed properly. sl@0: //! (8-bit/Asynchronous variant) sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions See description and the config file. sl@0: //! @SYMTestExpectedResults sl@0: //! The table reads without error, it contains 1 record. sl@0: //! @SYMREQ REQ5792 sl@0: sl@0: CONSECUTIVE sl@0: RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini CheckFollowingRollback sl@0: END_TESTCASE SYSLIB-SQL-CIT-1849 sl@0: sl@0: START_TESTCASE SYSLIB-SQL-CIT-1850 sl@0: //! @SYMTestCaseID SYSLIB-SQL-CIT-1850 sl@0: //! @SYMTestCaseDesc Verifies that streams behave - we pass a read stream sl@0: //! to a write stream. sl@0: //! (8-bit/Asynchronous variant) sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions See description and the config file. sl@0: //! @SYMTestExpectedResults sl@0: //! Runs without error. sl@0: //! @SYMREQ REQ5792 sl@0: sl@0: CONSECUTIVE sl@0: RUN_TEST_STEP 100 te_SQL_Suite CSQLCDT z:\TEF_SQL\APIBasic2-8S.ini CopyCellsWithStreams sl@0: END_TESTCASE SYSLIB-SQL-CIT-1850 sl@0: sl@0: START_TESTCASE SYSLIB-SQL-CIT-1851 sl@0: //! @SYMTestCaseID SYSLIB-SQL-CIT-1851 sl@0: //! @SYMTestCaseDesc A simple test of the effect of two binds without an sl@0: //! exec/reset between them. sl@0: //! (8-bit/Asynchronous variant) sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions See description and the config file. sl@0: //! @SYMTestExpectedResults sl@0: //! The second data to be bound gets written to the cell, sl@0: //! a PASS will be reported. sl@0: //! @SYMREQ REQ5792 sl@0: sl@0: CONSECUTIVE sl@0: RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini DoubleBind sl@0: END_TESTCASE SYSLIB-SQL-CIT-1851 sl@0: sl@0: START_TESTCASE SYSLIB-SQL-CIT-1852 sl@0: //! @SYMTestCaseID SYSLIB-SQL-CIT-1852 sl@0: //! @SYMTestCaseDesc A simple test using the OpenL and CreateL methods. sl@0: //! (8-bit/Asynchronous variant) sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions See description and the config file. sl@0: //! @SYMTestExpectedResults sl@0: //! Checks for appropriate error codes from the APIs called sl@0: //! and reports a PASS. sl@0: //! @SYMREQ REQ5792 sl@0: sl@0: CONSECTUTIVE sl@0: RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini LeaveMethods sl@0: END_TESTCASE SYSLIB-SQL-CIT-1852 sl@0: sl@0: RUN_UTILS DeleteFile C:\Leave1.db sl@0: RUN_UTILS DeleteFile C:\MCO1.db sl@0: RUN_UTILS DeleteFile C:\MCO2.db sl@0: RUN_UTILS DeleteFile C:\MCO3.db sl@0: RUN_UTILS DeleteFile C:\MCO4.db sl@0: RUN_UTILS DeleteFile C:\MCO5.db sl@0: START_TESTCASE SYSLIB-SQL-CIT-1853 sl@0: //! @SYMTestCaseID SYSLIB-SQL-CIT-1853 sl@0: //! @SYMTestCaseDesc Tests the effect of multiple sequential Creates and Opens. sl@0: //! (8-bit/Asynchronous variant) sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions See description and the config file. sl@0: //! @SYMTestExpectedResults sl@0: //! Verifies that multiple Creates and Opens with the same sl@0: //! RSqlDatabase object does not generate an error. You sl@0: //! might expect a PANIC but you'd be wrong! Note the sl@0: //! deletes afterwards, these clean up where we can't because sl@0: //! all of the databases get locked. sl@0: //! @SYMREQ REQ5792 sl@0: sl@0: RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini MultipleCreateOpen sl@0: END_TESTCASE SYSLIB-SQL-CIT-1853 sl@0: sl@0: RUN_UTILS DeleteFile C:\Leave1.db sl@0: RUN_UTILS DeleteFile C:\MCO1.db sl@0: RUN_UTILS DeleteFile C:\MCO2.db sl@0: RUN_UTILS DeleteFile C:\MCO3.db sl@0: RUN_UTILS DeleteFile C:\MCO4.db sl@0: RUN_UTILS DeleteFile C:\MCO5.db sl@0: sl@0: START_TESTCASE SYSLIB-SQL-CIT-1854 sl@0: //! @SYMTestCaseID SYSLIB-SQL-CIT-1854 sl@0: //! @SYMTestCaseDesc Further bind tests. sl@0: //! (8-bit/Asynchronous variant) sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions See description and the config file. sl@0: //! @SYMTestExpectedResults sl@0: //! A couple of tests that verify that a bind can be used sl@0: //! in combination with a SELECT to fetch data from a table sl@0: //! based on parameters in the bind. The first one uses sl@0: //! integers, the second a binary field (though it's defined sl@0: //! as text in the 'Create table' line). For no special sl@0: //! reason we run these concurrently. It isn't really a sl@0: //! concurrency test, just two tests executing concurrently. sl@0: //! @SYMREQ REQ5792 sl@0: sl@0: CONCURRENT sl@0: RUN_TEST_STEP 100 te_SQL_Suite CSQLCDT z:\TEF_SQL\APIBasic2-8S.ini ExtraBindTest sl@0: RUN_TEST_STEP 100 te_SQL_Suite CSQLCDT z:\TEF_SQL\APIBasic2-8S.ini ExtraBindTest2 sl@0: END_TESTCASE SYSLIB-SQL-CIT-1854 sl@0: