Example #1
0
/* 주어진 fitAction의 유형을 따라서 기능 실행하는 함수 */
IDE_RC iduFitManager::validateFitAction( iduFitAction *aFitAction )
{

    switch ( aFitAction->mType )
    {
        case IDU_FIT_ACTION_HIT:
        {
            IDE_TEST( hitServer(aFitAction) != IDE_SUCCESS );
            break;
        }
        case IDU_FIT_ACTION_JUMP:
        {
            IDE_TEST( abortServer(aFitAction) != IDE_SUCCESS );
            break;
        }
        case IDU_FIT_ACTION_KILL:
        {
            IDE_TEST( killServer(aFitAction) != IDE_SUCCESS );
            break;
        }
        case IDU_FIT_ACTION_SLEEP:
        {
            IDE_TEST( sleepServer(aFitAction) != IDE_SUCCESS );
            break;
        }
        case IDU_FIT_ACTION_TIME_SLEEP:
        {
            IDE_TEST( timeSleepServer(aFitAction) != IDE_SUCCESS );
            break;
        }
        case IDU_FIT_ACTION_WAKEUP:
        {
            IDE_TEST( wakeupServerBySignal(aFitAction) != IDE_SUCCESS );
            break;
        }
        case IDU_FIT_ACTION_WAKEUP_ALL:
        {
            IDE_TEST( wakeupServerByBroadcast(aFitAction) != IDE_SUCCESS );
            break;
        }
        case IDU_FIT_ACTION_SIGSEGV:
        {
            IDE_TEST( sigsegvServer( aFitAction ) != IDE_SUCCESS );
            break;
        }
        default:
        {
           IDE_TEST( 0 );
        }
    }

    return IDE_SUCCESS;

    IDE_EXCEPTION_END;

    IDU_FIT_DEBUG_LOG( "FIT validateFitAction Failure." );

    return IDE_FAILURE;
}
		void HTTPClientTestObject::test<6>()
	{
		setupTheServer();

		LLHTTPClient::get("http://localhost:8888/test/timeout", newResult());
		runThePump(1.0f);
		killServer();
		runThePump();
		ensureStatusError();
		ensure_equals("reason", mReason, "STATUS_ERROR");
	}
Example #3
0
	void asset_upload_queue_object::test<5>()
	{
		reset();
		LLTestSupplier* supplier = new LLTestSupplier();
		LLAssetUploadQueue q("http://localhost:8888/test/success", supplier);
		supplier->set(&q);
		queue(q, "foo.bar");
		runThePump(10);
		ensure("upload queue not empty before request", q.isEmpty());
		queue(q, "baz.bar");
		ensure("upload queue not empty after request", q.isEmpty());
		runThePump(10);
		killServer();
	}
Example #4
0
    TEST_F(ShardConnFixture, InvalidateBadConnInPool) {
        ShardConnection conn1(TARGET_HOST, "test.user");
        ShardConnection conn2(TARGET_HOST, "test.user");
        ShardConnection conn3(TARGET_HOST, "test.user");

        conn1.done();
        conn3.done();

        const uint64_t badCreationTime = mongo::curTimeMicros64();
        killServer();

        try {
            conn2.get()->query("test.user", mongo::Query());
        }
        catch (const mongo::SocketException&) {
        }

        conn2.done();

        restartServer();
        checkNewConns(assertGreaterThan, badCreationTime, 10);
    }
Example #5
0
    TEST_F(ShardConnFixture, BadConnClearsPoolWhenKilled) {
        ShardConnection conn1(TARGET_HOST, "test.user");
        ShardConnection conn2(TARGET_HOST, "test.user");
        ShardConnection conn3(TARGET_HOST, "test.user");

        conn1.done();
        killServer();

        try {
            conn3.get()->query("test.user", mongo::Query());
        }
        catch (const mongo::SocketException&) {
        }

        restartServer();

        const uint64_t badCreationTime = conn3.get()->getSockCreationMicroSec();
        conn3.kill();
        // attempting to put a 'bad' connection back to the pool
        conn2.done();

        checkNewConns(assertGreaterThan, badCreationTime, 10);
    }
static void sighandler(int signal) {
	fprintf(stdout, "Received signal %d: %s.  Shutting down.\n", signal, strsignal(signal));
	killServer();
}