OSDN Git Service

DHA20091202分コード更新
authormorisita <morisita@1ed66053-1c2d-0410-8867-f7571e6e31d3>
Wed, 2 Dec 2009 09:53:20 +0000 (09:53 +0000)
committermorisita <morisita@1ed66053-1c2d-0410-8867-f7571e6e31d3>
Wed, 2 Dec 2009 09:53:20 +0000 (09:53 +0000)
git-svn-id: http://10.144.169.20/repos/um/branches/l7vsd-3.x-ramiel@8747 1ed66053-1c2d-0410-8867-f7571e6e31d3

l7vsd/module/protocol/sslid_session_data_processor.cpp
l7vsd/unit_tests/module_test/protocol_module_ip_test/protocol_module_ip_test.cpp
l7vsd/unit_tests/module_test/protocol_module_sslid_test/sslid_session_data_processor_test.cpp

index 6777b1c..77a8d59 100644 (file)
@@ -135,18 +135,14 @@ int sslid_session_data_processor::get_endpoint_from_session_data(
     try
     {
         std::map<std::string, boost::asio::ip::tcp::endpoint>::iterator itendpoint;
-        std::map<std::string, time_t>::iterator itlasttime;
-        time_t oldtime = 0;
         boost::asio::ip::tcp::endpoint temp_endpoint;
 
         {
             // lock the session map
             boost::mutex::scoped_lock sclock(session_map_mutex);
             itendpoint = session_endpoint_map.find(session_id);
-            itlasttime = session_lasttime_map.find(session_id);
             // can't get the data
-            if (itendpoint == session_endpoint_map.end() ||
-                 itlasttime == session_lasttime_map.end())
+            if (itendpoint == session_endpoint_map.end())
             {
                 /*-------- DEBUG LOG --------*/
                 if (unlikely(LOG_LV_DEBUG == getloglevel()))
@@ -160,62 +156,19 @@ int sslid_session_data_processor::get_endpoint_from_session_data(
 
                 return 1;
             }
-            oldtime = itlasttime->second;
-            temp_endpoint = itendpoint->second;
-        }
 
-        // expired time check
-        time_t now;
-        time(&now);
-        if (now - oldtime <= timeout)
+            endpoint = itendpoint->second;
+       }
+
+        /*-------- DEBUG LOG --------*/
+        if (unlikely(LOG_LV_DEBUG == getloglevel()))
         {
-            // time in
-             endpoint = temp_endpoint;
+            boost::format formatter("function : int sslid_session_data_processor::"
+                                    "get_endpoint_from_session_data() : endpoint is exist endpoint = [%s]:%d.");
+            formatter % endpoint.address().to_string() % endpoint.port();
+            putLogDebug(300147, formatter.str(), __FILE__, __LINE__);
         }
-        else
-        {
-            // time out
-            {
-                // lock the session map
-                boost::mutex::scoped_lock sclocktimeout(session_map_mutex);
-                // delete session from the map
-                std::multimap<time_t, std::string>::iterator itbegin;
-                std::multimap<time_t, std::string>::iterator itend;
-                itbegin = lasttime_session_map.lower_bound(oldtime);
-                itend = lasttime_session_map.upper_bound(oldtime);
-
-                while (itbegin != itend)
-                {
-                    if (itbegin->first == oldtime && itbegin->second == session_id)
-                    {
-                        lasttime_session_map.erase(itbegin);
-                        break;
-                    }
-                    ++itbegin;
-                }
-                session_endpoint_map.erase(session_id);
-                session_lasttime_map.erase(session_id);
-            }
-
-            // update the replication list
-            sslid_replication_temp_data temp_data;
-            temp_data.op_code = 'D';
-            temp_data.session_id = session_id;
-
-            replication_data_processor->put_into_temp_list(temp_data);
-            /*-------- DEBUG LOG --------*/
-            if (unlikely(LOG_LV_DEBUG == getloglevel()))
-            {
-                std::string buffer;
-                ssl_protocol_module_base::dump_session_id(session_id.c_str(), session_id.size(), buffer);
-                boost::format formatter("function : int sslid_session_data_processor::"
-                                        "get_endpoint_from_session_data() : put_into_temp_list() "
-                                        "--delete item session_id = %s -- end.");
-                formatter % buffer;
-                putLogDebug(300147, formatter.str(), __FILE__, __LINE__);
-            }
-            /*------DEBUG LOG END------*/
-            }
+        /*------DEBUG LOG END------*/
     }
     catch(const std::exception& e)
     {
@@ -361,7 +314,7 @@ int sslid_session_data_processor::write_session_data(
                 if (unlikely(LOG_LV_DEBUG == getloglevel()))
                 {
                     putLogDebug(300153, "function : int sslid_session_data_processor::"
-                                "write_session_data() : clear_expired_session_data() END.",
+                                "write_session_data() : clear_expired_session_data() end.",
                                 __FILE__, __LINE__);
                 }
                 /*------DEBUG LOG END------*/
@@ -536,8 +489,6 @@ int sslid_session_data_processor::clear_expired_session_data()
     // map must be already locked
     int ret = 0;
 
-    bool bdelete = false;
-
     if (session_endpoint_map.size() == 0)
     {
          /*-------- DEBUG LOG --------*/
@@ -551,73 +502,40 @@ int sslid_session_data_processor::clear_expired_session_data()
         return 1;
     }
 
-    // none record time expired, delete the oldest session
-    // get current time
-    time_t now;
-    time(&now);
-    // delete all the expired time from the session_lasttime_map
     sslid_replication_temp_data temp_data;
-    std::multimap<time_t, std::string>::iterator itmulti;
-    for (itmulti = lasttime_session_map.begin(); itmulti != lasttime_session_map.end();)
+    std::string session_id = lasttime_session_map.begin()->second;
+    lasttime_session_map.erase(lasttime_session_map.begin());
+    session_endpoint_map.erase(session_id);
+    session_lasttime_map.erase(session_id);
+    /*-------- DEBUG LOG --------*/
+    if (unlikely(LOG_LV_DEBUG == getloglevel()))
     {
-        // record the oldest time
-        if (now - itmulti->first > timeout)
-        {
-            // time out
-            bdelete = true;
-            temp_data.op_code = 'D';
-            temp_data.session_id = itmulti->second;
-
-            session_endpoint_map.erase(itmulti->second);
-            session_lasttime_map.erase(itmulti->second);
-            lasttime_session_map.erase(itmulti++);
-
-            // put into replication temp list
-            replication_data_processor->put_into_temp_list(temp_data);
-            /*-------- DEBUG LOG --------*/
-            if (unlikely(LOG_LV_DEBUG == getloglevel()))
-            {
-                std::string buffer;
-                ssl_protocol_module_base::dump_session_id(temp_data.session_id.c_str(), temp_data.session_id.size(), buffer);
-                boost::format formatter("function : int sslid_session_data_processor::"
-                            "clear_expired_session_data() : put_into_temp_list() "
-                            "--delete expired time item session_id = %s -- end.");
-                formatter % buffer;
-                putLogDebug(300163, formatter.str(), __FILE__, __LINE__);
-            }
-            /*------DEBUG LOG END------*/
-        }
-        else
-        {
-            // time in
-            break;
-        }
+        std::string buffer;
+        ssl_protocol_module_base::dump_session_id(session_id.c_str(), session_id.size(), buffer);
+        boost::format formatter("function : int sslid_session_data_processor::"
+                    "clear_expired_session_data() : "
+                    "--delete oldest time item form the map session_id = %s -- end.");
+        formatter % buffer;
+        putLogDebug(300163, formatter.str(), __FILE__, __LINE__);
     }
+    /*------DEBUG LOG END------*/
 
-    if (!bdelete)
+    // put into replication temp list
+    temp_data.op_code = 'D';
+    temp_data.session_id = session_id;
+    replication_data_processor->put_into_temp_list(temp_data);
+    /*-------- DEBUG LOG --------*/
+    if (unlikely(LOG_LV_DEBUG == getloglevel()))
     {
-        std::string session_id = lasttime_session_map.begin()->second;
-        lasttime_session_map.erase(lasttime_session_map.begin());
-        session_endpoint_map.erase(session_id);
-        session_lasttime_map.erase(session_id);
-
-        // put into replication temp list
-        temp_data.op_code = 'D';
-        temp_data.session_id = session_id;
-        replication_data_processor->put_into_temp_list(temp_data);
-        /*-------- DEBUG LOG --------*/
-        if (unlikely(LOG_LV_DEBUG == getloglevel()))
-        {
-            std::string buffer;
-            ssl_protocol_module_base::dump_session_id(session_id.c_str(), session_id.size(), buffer);
-            boost::format formatter("function : int sslid_session_data_processor::"
-                        "clear_expired_session_data() : put_into_temp_list() "
-                        "--delete oldest time item session_id = %s -- end.");
-            formatter % buffer;
-            putLogDebug(300164, formatter.str(), __FILE__, __LINE__);
-        }
-        /*------DEBUG LOG END------*/
+        std::string buffer;
+        ssl_protocol_module_base::dump_session_id(session_id.c_str(), session_id.size(), buffer);
+        boost::format formatter("function : int sslid_session_data_processor::"
+                    "clear_expired_session_data() : put_into_temp_list() "
+                    "--delete oldest time item session_id = %s -- end.");
+        formatter % buffer;
+        putLogDebug(300164, formatter.str(), __FILE__, __LINE__);
     }
+    /*------DEBUG LOG END------*/
 
     /*-------- DEBUG LOG --------*/
     if (unlikely(LOG_LV_DEBUG == getloglevel()))
index c76b42c..bc2105f 100644 (file)
@@ -1776,6 +1776,9 @@ public:
         BOOST_CHECK_EQUAL(itr->second->data_state, HTTP_START);
         BOOST_CHECK_EQUAL(itr->second->last_status, REALSERVER_RECV);
         BOOST_CHECK_EQUAL(itr->second->ip_hash, static_cast<int>(l7vs_ip_service_calc_hash(itr->second->client_endpoint)));
+       BOOST_CHECK_EQUAL(itr->second->buffer_sequence.empty(), true);
+       
+       this->handle_session_finalize(boost::this_thread::get_id(), down_thread.get_id());
     }
 
     //handle_session_initialize
@@ -1831,7 +1834,11 @@ public:
             BOOST_CHECK_EQUAL(itr->second->current_message_rest_size, 0u);
             BOOST_CHECK_EQUAL(itr->second->data_state, HTTP_START);
             BOOST_CHECK_EQUAL(itr->second->last_status, REALSERVER_RECV);
+           BOOST_CHECK_EQUAL(itr->second->buffer_sequence.empty(), true);
+
         }
+       this->handle_session_finalize(boost::this_thread::get_id(), down_thread.get_id());
+
     }
 
     //handle_session_finalize
@@ -2071,6 +2078,7 @@ public:
             ret = this->handle_client_recv(boost::this_thread::get_id(), recvbuffer, recvlen);
             BOOST_CHECK_EQUAL(ret, FINALIZE);
             BOOST_CHECK_EQUAL(thread_data->last_status, FINALIZE);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2100,6 +2108,7 @@ public:
             BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,thread_data->data_length);
             BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2129,6 +2138,7 @@ public:
             BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,thread_data->data_length);
             BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2158,6 +2168,7 @@ public:
             BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,thread_data->data_length);
             BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2187,6 +2198,7 @@ public:
             BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,thread_data->data_length);
             BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2211,6 +2223,7 @@ public:
             ret = this->handle_client_recv(boost::this_thread::get_id(), recvbuffer, recvlen);
             BOOST_CHECK_EQUAL(ret, CLIENT_RECV);
             BOOST_CHECK_EQUAL(thread_data->last_status, CLIENT_RECV);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2239,6 +2252,7 @@ public:
             BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,10u + http_header_len);
             BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2268,6 +2282,7 @@ public:
             BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,10u + http_header_len);
             BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2295,6 +2310,7 @@ public:
             BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,48u);
             BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
         cout << "[118]--------------------------------------------- " << endl;
@@ -2324,6 +2340,7 @@ public:
             BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,http_header_len-8);
             BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2351,6 +2368,7 @@ public:
             BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,48u);
             BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
         cout << "[120]--------------------------------------------- " << endl;
@@ -2380,6 +2398,7 @@ public:
             BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,http_header_len - 8);
             BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2408,6 +2427,7 @@ public:
             BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,69u+100u);
             BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2435,6 +2455,7 @@ public:
             BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,69u+100u);
             BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2460,6 +2481,7 @@ public:
             BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,110u);
             BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2484,6 +2506,7 @@ public:
             BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,110u);
             BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
         cout << "[125]--------------------------------------------- " << endl;
@@ -2506,6 +2529,7 @@ public:
             ret = this->handle_client_recv(boost::this_thread::get_id(), recvbuffer, recvlen);
             BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2529,6 +2553,7 @@ public:
             ret = this->handle_client_recv(boost::this_thread::get_id(), recvbuffer, recvlen);
             BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2552,6 +2577,7 @@ public:
             ret = this->handle_client_recv(boost::this_thread::get_id(), recvbuffer, recvlen);
             BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
 
@@ -2575,6 +2601,7 @@ public:
             ret = this->handle_client_recv(boost::this_thread::get_id(), recvbuffer, recvlen);
             BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
             BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
+                       delete [] thread_data->data_buffer;     
             session_thread_data_map.clear();
         }
     }
@@ -2611,6 +2638,7 @@ public:
                 boost::mutex::scoped_lock sclock(session_thread_data_map_mutex);
                 BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
                 BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
+                               delete [] thread_data->data_buffer;     
                 session_thread_data_map.erase(boost::this_thread::get_id());
             }
         }
@@ -4159,7 +4187,6 @@ public:
                              const char*, int)> inputLogInfo = stb_putLogInfo;
         boost::function<void(const unsigned int, const std::string&,
                              const char*, int)> inputLogDebug = stb_putLogDebug;
-        char* ip_replication_area_begain = new char[10];
 
         boost::asio::ip::tcp::endpoint virtual_service_endpoint;
         ip_session_table_entry ip_session_entry_data;
@@ -4192,7 +4219,6 @@ public:
             }
         }
 
-        delete [] ip_replication_area_begain;
     }
 
     //handle_realserver_select(udp)
@@ -4265,6 +4291,7 @@ public:
             BOOST_CHECK_EQUAL(thread_data->realserver_connect_failed_count, 0);
             BOOST_CHECK_EQUAL(send_buffer_len, strlen(send_buffer_context));
             BOOST_CHECK_EQUAL(thread_data->buffer_sequence.empty(), true);
+            delete[] thread_data->data_buffer;
             this->session_thread_data_map.clear();
         }
 
@@ -4753,7 +4780,6 @@ public:
             data->current_message_rest_size = 0;
             data->data_length = 0;
             data->data_offset = 5;
-            data->data_state = HTTP_BODY;
             ret = this->handle_realserver_send(boost::this_thread::get_id());
             BOOST_CHECK_EQUAL(ret, CLIENT_RECV);
             BOOST_CHECK_EQUAL(data->data_state, HTTP_START);
@@ -4819,7 +4845,6 @@ public:
             data->data_buffer = data_buffer;
             memset(data->data_buffer, 0, MAX_BUFFER_SIZE);
             memcpy(data->data_buffer, buffer, strlen(buffer));
-            data->data_offset = 0;
             data->current_message_rest_size = 0;
             data->data_length = strlen(buffer);
             data->data_state = HTTP_BODY;
@@ -4968,6 +4993,7 @@ public:
         }
 
 
+               delete [] data_buffer;
     }
 
     //handle_realserver_send
@@ -5177,7 +5203,7 @@ public:
 
             ret = handle_sorryserver_connect(boost::this_thread::get_id(), send_buffer, send_buffer_len);
 
-            char * send_buffer_context = "POST /sorry.html HTTP/1.0\r\nX-Forwarded-For: 10.10.10.10\r\nContent-Length: 65493\r\n\r\n";
+            char * send_buffer_context = "POST /sorry_uri.html HTTP/1.0\r\nX-Forwarded-For: 10.10.10.10\r\nContent-Length: 65493\r\n\r\n";
             cmp_ret = memcmp(send_buffer.c_array(), send_buffer_context, strlen(send_buffer_context));
             BOOST_CHECK_EQUAL(cmp_ret, 0);// uriを置き換えし、X-Forworded-For文字列を添加する
             BOOST_CHECK_EQUAL(ret, SORRYSERVER_SEND);// 遷移先ステータスを設定する
@@ -5223,7 +5249,7 @@ public:
             BOOST_CHECK_EQUAL(ret, SORRYSERVER_SEND);// 遷移先ステータスを設定する
             BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_SEND);// 遷移ステータスを保存する
             BOOST_CHECK_EQUAL(thread_data->data_state, HTTP_BODY);// データ状態にHTTP_BODYを設定する
-            BOOST_CHECK_EQUAL(send_buffer_len, http_header_len + 10);//sorry_uri's length
+            BOOST_CHECK_EQUAL(send_buffer_len, http_header_len );//sorry_uri's length
             BOOST_CHECK_EQUAL(cmp_ret, 0);// 送信バッファにデータを送信可能サイズ分コピーする
             BOOST_CHECK_EQUAL(thread_data->current_message_rest_size, 65493u);// 未送信データサイズに送信可能サイズを減算する
             BOOST_CHECK_EQUAL(thread_data->data_length, 0u);
@@ -5355,9 +5381,9 @@ public:
             char* http_header_ptr = "Get / HTTP/1.0\r\nContent-Length: 200\r\n\r\n";
             size_t http_header_len = strlen(http_header_ptr);
             memcpy(thread_data->data_buffer, http_header_ptr, http_header_len);
-            thread_data->data_length = http_header_len - 16; //ship "Get / HTTP/1.0\r\n"
-            thread_data->data_offset = 16;//"Get / HTTP/1.0\r\n"is already sent
-            thread_data->current_message_rest_size = http_header_len - 16 + 200;
+            thread_data->data_length = http_header_len - 15; //ship "Get / HTTP/1.0\r\n"
+            thread_data->data_offset = 15;//"Get / HTTP/1.0\r\n"is already sent
+            thread_data->current_message_rest_size = http_header_len - 15 + 200;
             thread_data->data_buffer_size = MAX_BUFFER_SIZE;
             this->forwarded_for = FORWARDED_FOR_ON;
             thread_data->forwarded_for_buffer.assign('0');
@@ -5413,7 +5439,7 @@ public:
             buffer_element = std::make_pair(thread_data->forwarded_for_buffer.data(), 31);
             thread_data->buffer_sequence.push_back(buffer_element);
 
-            buffer_element = std::make_pair(thread_data->data_buffer + 16, 23);
+            buffer_element = std::make_pair(thread_data->data_buffer + 15, thread_data->data_length);
             thread_data->buffer_sequence.push_back(buffer_element);
 
             ret = handle_sorryserver_connect(boost::this_thread::get_id(), send_buffer, send_buffer_len);
@@ -5645,7 +5671,8 @@ public:
         data->thread_id = boost::this_thread::get_id();
         this->session_thread_data_map[boost::this_thread::get_id()] = data;
         ret = this->handle_sorryserver_connection_fail(boost::this_thread::get_id(), ep);
-        BOOST_CHECK_EQUAL(ret, CLIENT_DISCONNECT); // 遷移先ステータス status = CLIENT_DISCONNECT
+        BOOST_CHECK_EQUAL(data->end_flag, END_FLAG_ON);
+               BOOST_CHECK_EQUAL(ret, CLIENT_DISCONNECT); // 遷移先ステータス status = CLIENT_DISCONNECT
         BOOST_CHECK_EQUAL(data->last_status, CLIENT_DISCONNECT);// 遷移ステータスを保存する
     }
 
@@ -6049,6 +6076,7 @@ public:
             this->session_thread_data_map[boost::this_thread::get_id()] = down_thread_data;
             boost::asio::ip::tcp::endpoint ep;
             status = this->handle_realserver_recv(boost::this_thread::get_id(),ep,recvbuffer,recvlen);
+                       BOOST_CHECK_EQUAL(status, this->session_thread_data_map[boost::this_thread::get_id()]->last_status);
             BOOST_CHECK_EQUAL(status, FINALIZE);
             this->session_thread_data_map.clear();
             delete[] down_thread_data->data_buffer;
@@ -6454,6 +6482,8 @@ public:
             this->session_thread_data_map[boost::this_thread::get_id()] = down_thread_data;
             boost::asio::ip::tcp::endpoint ep;
             status = this->handle_sorryserver_recv(boost::this_thread::get_id(),ep,recvbuffer,recvlen);
+                       BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->switch_flag, SWITCH_FLAG_OFF);
+                       BOOST_CHECK_EQUAL(status, this->session_thread_data_map[boost::this_thread::get_id()]->last_status);
             BOOST_CHECK_EQUAL(status, FINALIZE);
             this->session_thread_data_map.clear();
             delete[] down_thread_data->data_buffer;
@@ -6478,6 +6508,7 @@ public:
             status = this->handle_sorryserver_recv(boost::this_thread::get_id(),ep,recvbuffer,recvlen);
             BOOST_CHECK_EQUAL(status, this->session_thread_data_map[boost::this_thread::get_id()]->last_status);
             BOOST_CHECK_EQUAL(status, CLIENT_CONNECTION_CHECK);
+                       BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->current_message_rest_size, 20u);
             this->session_thread_data_map.clear();
             delete[] down_thread_data->data_buffer;
         }
@@ -7368,7 +7399,7 @@ public:
         size_t datalen = 0;
         size_t datalen_t = 0;
         EVENT_TAG status;
-        char* ip_replication_area_begain = new char[100];
+        char* ip_replication_area_begain = NULL;
         int ip_replication_area_size = 100;
         std::string session_id;
         boost::asio::ip::tcp::endpoint virtual_service_endpoint;
@@ -7441,18 +7472,17 @@ public:
                 BOOST_CHECK_EQUAL(cmp_ret, 0);
                 BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->current_message_rest_size, 0u);
                 BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->data_offset, 15u);
-                BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->data_length, 15u);
+                BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->data_length, 5u);
 
                 ip_session_table_entry entry = (dynamic_cast<ip_session_data_processor_stub*>(ip_data_processor))
                                                ->get_session_data_stub(down_thread_data->ip_hash);
                 //BOOST_CHECK_EQUAL(entry.rs_endpoint, init_endpoint);
                 //BOOST_CHECK(entry.last_time != 0);
 
-                delete down_thread_data->data_buffer;
+                delete [] down_thread_data->data_buffer;
                 this->session_thread_data_map.erase(boost::this_thread::get_id());
 
             }
-            delete [] ip_replication_area_begain;
         }
     }
 
@@ -8504,7 +8534,7 @@ public:
             status = this->handle_sorry_enable(boost::this_thread::get_id());
             {
                 boost::mutex::scoped_lock sclock(session_thread_data_map_mutex);
-                BOOST_CHECK_EQUAL(thread_data->sorry_flag, SORRY_FLAG_OFF);
+                BOOST_CHECK_EQUAL(thread_data->sorry_flag, SORRY_FLAG_ON);
                 BOOST_CHECK_EQUAL(status, ACCEPT);
                 BOOST_CHECK_EQUAL(thread_data->last_status, ACCEPT);
             }
index d767700..c311159 100644 (file)
@@ -248,7 +248,7 @@ public:
                boost::asio::ip::tcp::endpoint get_endpoint;
                boost::asio::ip::tcp::endpoint saved_endpoint;
                sslid_replication_temp_data temp_list_data;
-               sslid_replication_data_processor_replacement *this_replication_data_processor =
+               //sslid_replication_data_processor_replacement *this_replication_data_processor =
                        dynamic_cast<sslid_replication_data_processor_replacement *>(this->replication_data_processor);
 
     cout << "[7]------------------------------------------" << endl;
@@ -276,13 +276,13 @@ public:
                this->session_endpoint_map.clear();
                this->session_lasttime_map.clear();
                this->lasttime_session_map.clear();
-               this->session_endpoint_map[session_id] = saved_endpoint;
+               //this->session_endpoint_map[session_id] = saved_endpoint;
                result = this->get_endpoint_from_session_data(session_id, get_endpoint);
                // function result check
                BOOST_CHECK_EQUAL(result, 1);
 
     cout << "[10]------------------------------------------" << endl;
-               // unit_test[10] ï¼\91ã\81¤ã\81®ã\83\87ã\83¼ã\82¿ã\81\8cmapã\81«å­\98å\9c¨ã\81\97ã\81¦ã\80\81ã\82¿ã\82¤ã\83 ã\82¢ã\82¦ã\83\88ã\81\97ã\81ªã\81\84場合、戻り値が正常(0)で設定する。
+               // unit_test[10] ï¼\91ã\81¤ã\81®ã\83\87ã\83¼ã\82¿ã\81\8cmapã\81«å­\98å\9c¨ã\81\97ã\81\99ã\82\8b場合、戻り値が正常(0)で設定する。
                result = 10;
                session_id = "test_id123456789abcdefghijklmnop";
                saved_endpoint.address(boost::asio::ip::address::from_string("192.168.120.102"));
@@ -302,32 +302,32 @@ public:
 
     cout << "[11]------------------------------------------" << endl;
                // unit_test[11] 1つのデータがmapに存在して、タイムアウトの場合、戻り値が正常(0)で設定する。
-               result = 10;
-               this->timeout = 0;
-               this->session_endpoint_map.clear();
-               this->session_lasttime_map.clear();
-               this->lasttime_session_map.clear();
-               this_replication_data_processor->get_temp_list().clear();
-               this->session_endpoint_map[session_id] = saved_endpoint;
-               this->session_lasttime_map[session_id] = last_time - 10;
-               this->lasttime_session_map.insert(std::make_pair(last_time - 10, session_id));
-               result = this->get_endpoint_from_session_data(session_id, get_endpoint);
+               //result = 10;
+               //this->timeout = 0;
+               //this->session_endpoint_map.clear();
+               //this->session_lasttime_map.clear();
+               //this->lasttime_session_map.clear();
+               //this_replication_data_processor->get_temp_list().clear();
+               //this->session_endpoint_map[session_id] = saved_endpoint;
+               //this->session_lasttime_map[session_id] = last_time - 10;
+               //this->lasttime_session_map.insert(std::make_pair(last_time - 10, session_id));
+               //result = this->get_endpoint_from_session_data(session_id, get_endpoint);
                // get the item which put into the temp_list
-               this_replication_data_processor->to_get_from_temp_list(temp_list_data);
+               //this_replication_data_processor->to_get_from_temp_list(temp_list_data);
                // session_endpoint_map item removed check
-               BOOST_CHECK_EQUAL(this->session_endpoint_map.size(), 0u);
+               //BOOST_CHECK_EQUAL(this->session_endpoint_map.size(), 0u);
                // session_lasttime_map item removed check
-               BOOST_CHECK_EQUAL(this->session_lasttime_map.size(), 0u);
+               //BOOST_CHECK_EQUAL(this->session_lasttime_map.size(), 0u);
                // lasttime_session_map item removed check
-               BOOST_CHECK_EQUAL(this->lasttime_session_map.size(), 0u);
+               //BOOST_CHECK_EQUAL(this->lasttime_session_map.size(), 0u);
                // function result check
-               BOOST_CHECK_EQUAL(result, 0);
+               //BOOST_CHECK_EQUAL(result, 0);
                // the item which put into the temp_list check
-               BOOST_CHECK_EQUAL(temp_list_data.op_code, 'D');
-               BOOST_CHECK_EQUAL(temp_list_data.session_id, session_id);
+               //BOOST_CHECK_EQUAL(temp_list_data.op_code, 'D');
+               //BOOST_CHECK_EQUAL(temp_list_data.session_id, session_id);
 
     cout << "[12]------------------------------------------" << endl;
-               // unit_test[12] mapに3つデータがあり、且つ3つデータが全部タイムアウトしない場合、戻り値が正常(0)で設定する。
+               // unit_test[12] mapに3つデータがあり、戻り値が正常(0)で設定する。
                result = 10;
                std::string temp_session_id1 = "temp_session_idyyyyyuuuu33456780";
                std::string temp_session_id2 = "temp_session_id456789012rtyuerxy";
@@ -353,7 +353,7 @@ public:
                BOOST_CHECK_EQUAL(get_endpoint, saved_endpoint);
 
     cout << "[13]------------------------------------------" << endl;
-               // unit_test[13] mapに3つデータがあり、且つ2つデータがタイムアウトしなくて,1つのデータだけタイムアウトの場合、戻り値が正常(0)で設定する。
+               // unit_test[13] mapに3つデータがあり、戻り値が正常(0)で設定する。
                time_t temp_last_time = time(0) - 10;
                time_t out_time = time(0) - 5000;
                result = 10;
@@ -378,61 +378,61 @@ public:
 
     cout << "[14]------------------------------------------" << endl;
                // unit_test[14] mapに3つデータがあり、且つ3つデータが全部タイムアウトの場合、戻り値が正常(0)で設定する。
-               temp_last_time = last_time - 10;
-               this->timeout = 0;
-               this->session_endpoint_map.clear();
-               this->session_lasttime_map.clear();
-               this->lasttime_session_map.clear();
-               this_replication_data_processor->get_temp_list().clear();
-               this->session_endpoint_map[session_id] = saved_endpoint;
-               this->session_endpoint_map[temp_session_id1] = temp_endpoint;
-               this->session_endpoint_map[temp_session_id2] = temp_endpoint;
-               this->session_lasttime_map[session_id] = temp_last_time ;
-               this->session_lasttime_map[temp_session_id1] = temp_last_time;
-               this->session_lasttime_map[temp_session_id2] = temp_last_time;
-               this->lasttime_session_map.insert(std::make_pair(temp_last_time, session_id));
-               this->lasttime_session_map.insert(std::make_pair(temp_last_time, temp_session_id1));
-               this->lasttime_session_map.insert(std::make_pair(temp_last_time, temp_session_id2));
-               result = this->get_endpoint_from_session_data(session_id, get_endpoint);
+               //temp_last_time = last_time - 10;
+               //this->timeout = 0;
+               //this->session_endpoint_map.clear();
+               //this->session_lasttime_map.clear();
+               //this->lasttime_session_map.clear();
+               //this_replication_data_processor->get_temp_list().clear();
+               //this->session_endpoint_map[session_id] = saved_endpoint;
+               //this->session_endpoint_map[temp_session_id1] = temp_endpoint;
+               //this->session_endpoint_map[temp_session_id2] = temp_endpoint;
+               //this->session_lasttime_map[session_id] = temp_last_time ;
+               //this->session_lasttime_map[temp_session_id1] = temp_last_time;
+               //this->session_lasttime_map[temp_session_id2] = temp_last_time;
+               //this->lasttime_session_map.insert(std::make_pair(temp_last_time, session_id));
+               //this->lasttime_session_map.insert(std::make_pair(temp_last_time, temp_session_id1));
+               //this->lasttime_session_map.insert(std::make_pair(temp_last_time, temp_session_id2));
+               //result = this->get_endpoint_from_session_data(session_id, get_endpoint);
                // get the item which put into the temp_list
-               this_replication_data_processor->to_get_from_temp_list(temp_list_data);
+               //this_replication_data_processor->to_get_from_temp_list(temp_list_data);
                // session_endpoint_map item removed check
-               BOOST_CHECK_EQUAL(this->session_endpoint_map.size(), 2u);
+               //BOOST_CHECK_EQUAL(this->session_endpoint_map.size(), 2u);
                // session_lasttime_map item removed check
-               BOOST_CHECK_EQUAL(this->session_lasttime_map.size(), 2u);
+               //BOOST_CHECK_EQUAL(this->session_lasttime_map.size(), 2u);
                // lasttime_session_map item removed check
-               BOOST_CHECK_EQUAL(this->lasttime_session_map.size(), 2u);
+               //BOOST_CHECK_EQUAL(this->lasttime_session_map.size(), 2u);
                // function result check
-               BOOST_CHECK_EQUAL(result, 0);
+               //BOOST_CHECK_EQUAL(result, 0);
                // the item which put into the temp_list check
-               BOOST_CHECK_EQUAL(temp_list_data.op_code, 'D');
-               BOOST_CHECK_EQUAL(temp_list_data.session_id, session_id);
+               //BOOST_CHECK_EQUAL(temp_list_data.op_code, 'D');
+               //BOOST_CHECK_EQUAL(temp_list_data.session_id, session_id);
 
     cout << "[15]------------------------------------------" << endl;
                // unit_test[15] メンバー関数timeoutが0でなくて、且つ検索対象データがタイムアウトの場合、戻り値が正常(0)で設定する。
-               temp_last_time = time(0) - 20;
-               this->timeout = 10;
-               this->session_endpoint_map.clear();
-               this->session_lasttime_map.clear();
-               this->lasttime_session_map.clear();
-               this_replication_data_processor->get_temp_list().clear();
-               this->session_endpoint_map[session_id] = saved_endpoint;
-               this->session_lasttime_map[session_id] = temp_last_time;
-               this->lasttime_session_map.insert(std::make_pair(temp_last_time, session_id));
-               result = this->get_endpoint_from_session_data(session_id, get_endpoint);
+               //temp_last_time = time(0) - 20;
+               //this->timeout = 10;
+               //this->session_endpoint_map.clear();
+               //this->session_lasttime_map.clear();
+               //this->lasttime_session_map.clear();
+               //this_replication_data_processor->get_temp_list().clear();
+               //this->session_endpoint_map[session_id] = saved_endpoint;
+               //this->session_lasttime_map[session_id] = temp_last_time;
+               //this->lasttime_session_map.insert(std::make_pair(temp_last_time, session_id));
+               //result = this->get_endpoint_from_session_data(session_id, get_endpoint);
                // get the item which put into the temp_list
-               this_replication_data_processor->to_get_from_temp_list(temp_list_data);
+               //this_replication_data_processor->to_get_from_temp_list(temp_list_data);
                // session_endpoint_map item removed check
-               BOOST_CHECK_EQUAL(this->session_endpoint_map.size(), 0u);
+               //BOOST_CHECK_EQUAL(this->session_endpoint_map.size(), 0u);
                // session_lasttime_map item removed check
-               BOOST_CHECK_EQUAL(this->session_lasttime_map.size(), 0u);
+               //BOOST_CHECK_EQUAL(this->session_lasttime_map.size(), 0u);
                // lasttime_session_map item removed check
-               BOOST_CHECK_EQUAL(this->lasttime_session_map.size(), 0u);
+               //BOOST_CHECK_EQUAL(this->lasttime_session_map.size(), 0u);
                // function result check
-               BOOST_CHECK_EQUAL(result, 0);
+               //BOOST_CHECK_EQUAL(result, 0);
                // the item which put into the temp_list check
-               BOOST_CHECK_EQUAL(temp_list_data.op_code, 'D');
-               BOOST_CHECK_EQUAL(temp_list_data.session_id, session_id);
+               //BOOST_CHECK_EQUAL(temp_list_data.op_code, 'D');
+               //BOOST_CHECK_EQUAL(temp_list_data.session_id, session_id);
 
     cout << "[16]------------------------------------------" << endl;
                // unit_test[16] endpointがipv6で、1つのデータが存在して、且つタイムアウトしない場合、戻り値が正常(0)で設定する。
@@ -488,10 +488,10 @@ public:
                                                this, session_id1, endpoint1));
                thread_group.create_thread(boost::bind(
                                                &sslid_session_data_processor_test_class::get_endpoint_from_session_data_thread,
-                                               this, session_id2, default_endpoint));
+                                               this, session_id2, endpoint2));
                thread_group.create_thread(boost::bind(
                                                &sslid_session_data_processor_test_class::get_endpoint_from_session_data_thread,
-                                               this, session_id3, default_endpoint));
+                                               this, session_id3, endpoint3));
                thread_group.join_all();
        }
 
@@ -929,39 +929,39 @@ public:
 
     cout << "[31]------------------------------------------" << endl;
                // unit_test[31] mapに全てのアイテムがタイムアウトの場合、全てのアイテムを削除する。
-               test_time = time(0) - 5;
-               this->timeout = 0;
-               this->session_endpoint_map.clear();
-               this->session_lasttime_map.clear();
-               this->lasttime_session_map.clear();
-               this_replication_data_processor->get_temp_list().clear();
-               this->session_endpoint_map.insert(std::make_pair(session_id1, saved_endpoint1));
-               this->session_endpoint_map.insert(std::make_pair(session_id2, saved_endpoint2));
-               this->session_lasttime_map.insert(std::make_pair(session_id1, test_time));
-               this->session_lasttime_map.insert(std::make_pair(session_id2, test_time));
-               this->lasttime_session_map.insert(std::make_pair(test_time, session_id1));
-               this->lasttime_session_map.insert(std::make_pair(test_time, session_id2));
-               result = this->clear_expired_session_data();
+               //test_time = time(0) - 5;
+               //this->timeout = 0;
+               //this->session_endpoint_map.clear();
+               //this->session_lasttime_map.clear();
+               //this->lasttime_session_map.clear();
+               //this_replication_data_processor->get_temp_list().clear();
+               //this->session_endpoint_map.insert(std::make_pair(session_id1, saved_endpoint1));
+               //this->session_endpoint_map.insert(std::make_pair(session_id2, saved_endpoint2));
+               //this->session_lasttime_map.insert(std::make_pair(session_id1, test_time));
+               //this->session_lasttime_map.insert(std::make_pair(session_id2, test_time));
+               //this->lasttime_session_map.insert(std::make_pair(test_time, session_id1));
+               //this->lasttime_session_map.insert(std::make_pair(test_time, session_id2));
+               //result = this->clear_expired_session_data();
                // get data which put into temp_list
-               sslid_replication_temp_data& first_temp_list_data = this_replication_data_processor->get_temp_list().front();
-               sslid_replication_temp_data& last_temp_list_data = this_replication_data_processor->get_temp_list().back();
+               //sslid_replication_temp_data& first_temp_list_data = this_replication_data_processor->get_temp_list().front();
+               //sslid_replication_temp_data& last_temp_list_data = this_replication_data_processor->get_temp_list().back();
                // function result check
-               BOOST_CHECK_EQUAL(result, 0);
+               //BOOST_CHECK_EQUAL(result, 0);
                // session_endpoint_map items remove check
-               BOOST_CHECK_EQUAL(this->session_endpoint_map.size(), 0u);
+               //BOOST_CHECK_EQUAL(this->session_endpoint_map.size(), 0u);
                // session_lasttime_map items remove check
-               BOOST_CHECK_EQUAL(this->session_lasttime_map.size(), 0u);
+               //BOOST_CHECK_EQUAL(this->session_lasttime_map.size(), 0u);
                // lasttime_session_map items remove check
-               BOOST_CHECK_EQUAL(this->lasttime_session_map.size(), 0u);
+               //BOOST_CHECK_EQUAL(this->lasttime_session_map.size(), 0u);
                // temp_list item check
-               BOOST_CHECK_EQUAL(this_replication_data_processor->get_temp_list().size(), 2u);
-               BOOST_CHECK_EQUAL(first_temp_list_data.op_code, 'D');
-               BOOST_CHECK_EQUAL(first_temp_list_data.session_id, session_id1);
-               BOOST_CHECK_EQUAL(last_temp_list_data.op_code, 'D');
-               BOOST_CHECK_EQUAL(last_temp_list_data.session_id, session_id2);
+               //BOOST_CHECK_EQUAL(this_replication_data_processor->get_temp_list().size(), 2u);
+               //BOOST_CHECK_EQUAL(first_temp_list_data.op_code, 'D');
+               //BOOST_CHECK_EQUAL(first_temp_list_data.session_id, session_id1);
+               //BOOST_CHECK_EQUAL(last_temp_list_data.op_code, 'D');
+               //BOOST_CHECK_EQUAL(last_temp_list_data.session_id, session_id2);
 
     cout << "[32]------------------------------------------" << endl;
-               // unit_test[32] mapに1つのアイテムがタイムアウトで、もう1つのアイテムがタイムアウトしない場合、タイムアウトのアイテムだけ削除する。
+               // unit_test[32] mapに二つのアイテムの場合、タイムアウトのアイテムだけ削除する。
                saved_endpoint2.port(88);
                this->timeout = 100;
                test_time = time(0);
@@ -982,7 +982,7 @@ public:
                it2 = this->session_lasttime_map.begin();
                it3 = this->lasttime_session_map.begin();
                // get data which put into temp_list
-               first_temp_list_data = this_replication_data_processor->get_temp_list().front();
+               sslid_replication_temp_data& first_temp_list_data = this_replication_data_processor->get_temp_list().front();
                // remove ruslt check(item 'test_id123456789abcdefghijklmnop' is removed, but item 'test_id2abcdefghijklmnop23456789' is still existing)
                // function result check
                BOOST_CHECK_EQUAL(result, 0);
@@ -1004,46 +1004,46 @@ public:
 
     cout << "[33]------------------------------------------" << endl;
                // unit_test[33] mapに全てのアイテムがタイムアウトしない場合、一番古いアイテムを削除する。
-               this->timeout = 10000;
-               time_t earlier_time = test_time -5;
-               time_t earliest_time = test_time -10;
-               this->session_endpoint_map.clear();
-               this->session_lasttime_map.clear();
-               this->lasttime_session_map.clear();
-               this_replication_data_processor->get_temp_list().clear();
-               this->session_endpoint_map.insert(std::make_pair(session_id1, saved_endpoint1));
-               this->session_endpoint_map.insert(std::make_pair(session_id2, saved_endpoint2));
-               this->session_lasttime_map.insert(std::make_pair(session_id1, earlier_time));
-               this->session_lasttime_map.insert(std::make_pair(session_id2, earliest_time));
-               this->lasttime_session_map.insert(std::make_pair(earlier_time, session_id1));
-               this->lasttime_session_map.insert(std::make_pair(earliest_time, session_id2));
-               result = this->clear_expired_session_data();
-               it1 = this->session_endpoint_map.begin();
-               it2 = this->session_lasttime_map.begin();
-               it3 = this->lasttime_session_map.begin();
+               //this->timeout = 10000;
+               //time_t earlier_time = test_time -5;
+               //time_t earliest_time = test_time -10;
+               //this->session_endpoint_map.clear();
+               //this->session_lasttime_map.clear();
+               //this->lasttime_session_map.clear();
+               //this_replication_data_processor->get_temp_list().clear();
+               //this->session_endpoint_map.insert(std::make_pair(session_id1, saved_endpoint1));
+               //this->session_endpoint_map.insert(std::make_pair(session_id2, saved_endpoint2));
+               //this->session_lasttime_map.insert(std::make_pair(session_id1, earlier_time));
+               //this->session_lasttime_map.insert(std::make_pair(session_id2, earliest_time));
+               //this->lasttime_session_map.insert(std::make_pair(earlier_time, session_id1));
+               //this->lasttime_session_map.insert(std::make_pair(earliest_time, session_id2));
+               //result = this->clear_expired_session_data();
+               //it1 = this->session_endpoint_map.begin();
+               //it2 = this->session_lasttime_map.begin();
+               //it3 = this->lasttime_session_map.begin();
                // get data which put into temp_list
-               first_temp_list_data = this_replication_data_processor->get_temp_list().front();
+               //first_temp_list_data = this_replication_data_processor->get_temp_list().front();
                // remove ruslt check(item 'test_id2abcdefghijklmnop23456789' which has the earliest lasttime is removed)
                // function result check
-               BOOST_CHECK_EQUAL(result, 0);
+               //BOOST_CHECK_EQUAL(result, 0);
                // session_endpoint_map item remove check
-               BOOST_CHECK_EQUAL(this->session_endpoint_map.size(), 1u);
-               BOOST_CHECK_EQUAL(it1->first, session_id1);
-               BOOST_CHECK_EQUAL(it1->second, saved_endpoint1);
+               //BOOST_CHECK_EQUAL(this->session_endpoint_map.size(), 1u);
+               //BOOST_CHECK_EQUAL(it1->first, session_id1);
+               //BOOST_CHECK_EQUAL(it1->second, saved_endpoint1);
                // session_lasttime_map item remove check
-               BOOST_CHECK_EQUAL(this->session_lasttime_map.size(), 1u);
-               BOOST_CHECK_EQUAL(it2->first, session_id1);
-               BOOST_CHECK_EQUAL(it2->second, earlier_time);
+               //BOOST_CHECK_EQUAL(this->session_lasttime_map.size(), 1u);
+               //BOOST_CHECK_EQUAL(it2->first, session_id1);
+               //BOOST_CHECK_EQUAL(it2->second, earlier_time);
                // lasttime_session_map item remove check
-               BOOST_CHECK_EQUAL(this->lasttime_session_map.size(), 1u);
-               BOOST_CHECK_EQUAL(it3->first, earlier_time);
-               BOOST_CHECK_EQUAL(it3->second, session_id1);
+               //BOOST_CHECK_EQUAL(this->lasttime_session_map.size(), 1u);
+               //BOOST_CHECK_EQUAL(it3->first, earlier_time);
+               //BOOST_CHECK_EQUAL(it3->second, session_id1);
                // temp_list item check
-               BOOST_CHECK_EQUAL(first_temp_list_data.op_code, 'D');
-               BOOST_CHECK_EQUAL(first_temp_list_data.session_id, session_id2);
+               //BOOST_CHECK_EQUAL(first_temp_list_data.op_code, 'D');
+               //BOOST_CHECK_EQUAL(first_temp_list_data.session_id, session_id2);
 
     cout << "[34]------------------------------------------" << endl;
-               // unit_test[34] mapに全てのアイテムがタイムアウトしない場合、lasttimeが全て同じの場合、1つ目のアイテムを削除する。
+               // unit_test[34] mapに全てのアイテムlasttimeが全て同じの場合、1つ目のアイテムを削除する。
                std::string session_id3 = "test_id3wasfgasdasdwasdrggrtrrrr";
                this->timeout = 10000;
                this->session_endpoint_map.clear();