equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MULTITHREADTESTER_H_ |
|
19 #define MULTITHREADTESTER_H_ |
|
20 |
|
21 #include <e32base.h> |
|
22 |
|
23 class CWorker; |
|
24 |
|
25 /** |
|
26 * This test mainly tests, whether the server crashes or not under concurrent |
|
27 * use from a moderate amount of threads. The test has 4 worker threads |
|
28 * performing concurrent indexing and 5 searcher threads performing concurrent |
|
29 * searching. The test fails, if any operations fail (still, whether items |
|
30 * indexed are really in index, or if the search results are valid are not |
|
31 * tested) |
|
32 */ |
|
33 class CTestMultiThreading : public CBase |
|
34 { |
|
35 public: |
|
36 CTestMultiThreading(){} |
|
37 private: |
|
38 void setUp(); |
|
39 void tearDown(); |
|
40 public: |
|
41 void PrepareL(); |
|
42 void Wait(TInt aSeconds); |
|
43 void RunL(); |
|
44 void Finish(); |
|
45 void DoTestMultiThreadingL(); |
|
46 |
|
47 private: |
|
48 // CPix database |
|
49 |
|
50 RPointerArray<CWorker> *iWorkers; |
|
51 }; |
|
52 |
|
53 #endif /* MULTITHREADTESTER_H_ */ |