0
@@ -72,7 +72,7 @@ using namespace boost;
0
ensure_equals("After the session is closed, the app is kept around", pool->getCount(), 1u);
0
// If we call get() with an application root, then we close the session,
0
// and then we call get() again with the same application root,
0
// then the pool should not have spawned more than 1 app in total.
0
@@ -82,19 +82,19 @@ using namespace boost;
0
ensure_equals(pool->getCount(), 1u);
0
// If we call get() with an application root, then we call get() again before closing
0
// the session, then the pool should have spawned 2 apps in total.
0
Application::SessionPtr session(pool->get("stub/railsapp"));
0
- Application::SessionPtr session2(pool
->get("stub/railsapp"));
0
+ Application::SessionPtr session2(pool
2->get("stub/railsapp"));
0
ensure_equals(pool->getCount(), 2u);
0
// If we call get() twice with different application roots,
0
// then the pool should spawn two different apps.
0
Application::SessionPtr session(pool->get("stub/railsapp"));
0
- Application::SessionPtr session2(pool
->get("stub/railsapp2"));
0
+ Application::SessionPtr session2(pool
2->get("stub/railsapp2"));
0
ensure_equals("Before the sessions were closed, both apps were busy", pool->getActive(), 2u);
0
ensure_equals("Before the sessions were closed, both apps were in the pool", pool->getCount(), 2u);
0
@@ -109,7 +109,7 @@ using namespace boost;
0
// If we call get() twice with different application roots,
0
// and we close both sessions, then both 2 apps should still
0
@@ -121,7 +121,7 @@ using namespace boost;
0
ensure_equals(pool->getCount(), 2u);
0
// If we call get() even though the pool is already full
0
// (active == max), and the application root is already
0
// in the pool, then the pool should have tried to open
0
@@ -133,7 +133,7 @@ using namespace boost;
0
ensure_equals("No new app has been spawned", pool->getCount(), 1u);
0
// If ApplicationPool spawns a new instance,
0
// and we kill it, then the next get() with the
0
// same application root should throw an exception.
0
@@ -173,14 +173,14 @@ using namespace boost;
0
// If we call get() even though the pool is already full
0
// (active == max), and the application root is *not* already
0
// in the pool, then the pool will wait until enough sessions
0
Application::SessionPtr session1(pool->get("stub/railsapp"));
0
- Application::SessionPtr session2(pool
->get("stub/railsapp"));
0
+ Application::SessionPtr session2(pool
2->get("stub/railsapp"));
0
Application::SessionPtr session3;
0
@@ -206,7 +206,7 @@ using namespace boost;
0
// If we call get(), and:
0
// * the pool is already full, but there are inactive apps
0
// (active < count && count == max)
0
@@ -227,7 +227,7 @@ using namespace boost;
0
ensure_equals(pool->getCount(), 2u);
0
// Test whether Session is still usable after the Application has been destroyed.
0
Application::SessionPtr session(pool->get("stub/railsapp"));
0
@@ -243,7 +243,7 @@ using namespace boost;
0
ensure(result.find("hello world") != string::npos);
0
// If tmp/restart.txt is present, then the applications under app_root
0
// should be restarted.
0
@@ -263,7 +263,7 @@ using namespace boost;
0
// If tmp/restart.txt is present, but cannot be deleted, then
0
// the applications under app_root should still be restarted.
0
// However, a subsequent get() should not result in a restart.
0
@@ -288,7 +288,7 @@ using namespace boost;
0
unlink("stub/railsapp/tmp/restart.txt");
0
// If tmp/restart.txt is present, but cannot be deleted, then
0
// the applications under app_root should still be restarted.
0
// A subsequent get() should only restart if we've changed
0
@@ -313,7 +313,7 @@ using namespace boost;
0
unlink("stub/railsapp/tmp/restart.txt");
0
// Test whether restarting really results in code reload.
0
system("cp -f stub/railsapp/app/controllers/bar_controller_1.rb "
0
"stub/railsapp/app/controllers/bar_controller.rb");
0
@@ -333,7 +333,7 @@ using namespace boost;
0
unlink("stub/railsapp/app/controllers/bar_controller.rb");
0
// The cleaner thread should clean idle applications without crashing.
0
pool->setMaxIdleTime(1);
0
pool->get("stub/minimal-railsapp");
Comments
No one has commented yet.