File: ApplicationPool_PoolTest.cpp

package info (click to toggle)
ruby-passenger 3.0.13debian-1%2Bdeb7u2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 15,920 kB
  • sloc: cpp: 99,104; ruby: 18,098; ansic: 9,846; sh: 8,632; python: 141; makefile: 30
file content (33 lines) | stat: -rw-r--r-- 854 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "TestSupport.h"
#include "ApplicationPool/Pool.h"
#include "Utils.h"

using namespace Passenger;

namespace tut {
	struct ApplicationPool_PoolTest {
		ServerInstanceDirPtr serverInstanceDir;
		ServerInstanceDir::GenerationPtr generation;
		ApplicationPool::Ptr pool, pool2;
		
		ApplicationPool_PoolTest() {
			createServerInstanceDirAndGeneration(serverInstanceDir, generation);
			pool = ptr(new ApplicationPool::Pool("../helper-scripts/passenger-spawn-server", generation));
			pool2 = pool;
		}
		
		ApplicationPool::Ptr newPoolConnection() {
			return pool;
		}
		
		void reinitializeWithSpawnManager(AbstractSpawnManagerPtr spawnManager) {
			pool = ptr(new ApplicationPool::Pool(spawnManager));
			pool2 = pool;
		}
	};

	DEFINE_TEST_GROUP(ApplicationPool_PoolTest);

	#define USE_TEMPLATE
	#include "ApplicationPool_PoolTestCases.cpp"
}