[ 
https://issues.apache.org/jira/browse/GEODE-5837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Martell updated GEODE-5837:
-----------------------------------
    Description: 
Significant pieces of code in TcrMessage are not being tested. New tests should 
be written to test the following:
 * inline static ChunkObjectType readChunkPartHeader( 1259 : TcrMessage& msg, 
DataInput& input, DSCode expectedFirstType, 1260 : int32_t expectedPartType, 
const char* methodName, uint32_t& partLen, 1261 : uint8_t isLastChunk)
 * inline static ChunkObjectType readChunkPartHeader(TcrMessage& msg, 
DataInput& input, 1334 : const char* methodName, 1335 : uint32_t& partLen, 1336 
: uint8_t isLastChunk)
 * void TcrMessage::processChunk(const uint8_t* bytes, int32_t len, 724 : 
uint16_t endpointmemId, 725 : const uint8_t isLastChunkAndisSecurityHeader)
 * 
 void TcrMessage::readOldValue(DataInput& input)
 * 
void TcrMessage::readLongPart(DataInput& input, uint64_t* intValue) 
 * 
inline void TcrMessage::readCallbackObjectPart(DataInput& input,     227        
     :                                                bool defaultString)
 * 
void TcrMessage::chunkSecurityHeader(int skipPart, const uint8_t* bytes,     
884             :                                      int32_t len,     885     
        :                                      uint8_t 
isLastChunkAndSecurityHeader)
 * 
void TcrMessage::handleByteArrayResponse(     896             :     const char* 
bytearray, int32_t len, uint16_t endpointMemId,     897             :     const 
SerializationRegistry& serializationRegistry,     898             :     
MemberListForVersionStamp& memberListForVersionStamp)
 * 
TcrMessageClearRegion::TcrMessageClearRegion(    1401             :     
DataOutput* dataOutput, const Region* region,    1402             :     const 
std::shared_ptr<Serializable>& aCallbackArgument,    1403             :     
std::chrono::milliseconds messageResponsetimeout,    1404           6 :     
ThinClientBaseDM* connectionDM)
 * 
TcrMessageGetDurableCqs::TcrMessageGetDurableCqs(    1599           0 :     
DataOutput* dataOutput, ThinClientBaseDM* connectionDM) {    1600           0 : 
  m_request.reset(dataOutput)
 * 
TcrMessageCreateRegion::TcrMessageCreateRegion(    1938             :     
DataOutput* dataOutput, const std::string& str1, const std::string& str2,    
1939           0 :     bool isDurable, bool receiveValues, ThinClientBaseDM* 
connectionDM)
 * 
TcrMessageTxSynchronization::TcrMessageTxSynchronization(DataOutput* 
dataOutput,    2015             :                                               
           int ordinal, int txid,    2016           0 :                         
                                 int status)
 * 
TcrMessageTxFailover::TcrMessageTxFailover(DataOutput* dataOutput) {    2061    
       0 :   m_msgType = TcrMessage::TX_FAILOVER;    2062           0 :   
m_request.reset(dataOutput)
 * 
TcrMessageSize::TcrMessageSize(DataOutput* dataOutput, const char* regionName) 
{    2484           0 :   m_request.reset(dataOutput
 * 
TcrMessageRemoveUserAuth::TcrMessageRemoveUserAuth(    2516           0 :     
DataOutput* dataOutput, bool keepAlive, ThinClientBaseDM* connectionDM) {    
2517           0 :   m_request.reset(dataOutput)
 * 
void TcrMessage::addSecurityPart(int64_t connectionId, int64_t unique_id,    
2558             :                                  TcrConnection* conn)
 * 
void TcrMessage::addSecurityPart(int64_t connectionId, TcrConnection* conn)
 * 
TcrMessageAddPdxEnum::TcrMessageAddPdxEnum(    2685             :     
DataOutput* dataOutput, const std::shared_ptr<Cacheable>& pdxType,    2686      
     0 :     ThinClientBaseDM* connectionDM, int32_t pdxTypeId)
 * 
void TcrMessage::readEventIdPart(DataInput& input, bool skip, int32_t parts)
 * 
std::shared_ptr<DSMemberForVersionStamp> TcrMessage::readDSMember(    2874      
       :     apache::geode::client::DataInput& input)
 * 
void TcrMessage::readHashMapForGCVersions(    2904             :     
apache::geode::client::DataInput& input,    2905             :     
std::shared_ptr<CacheableHashMap>& value)
 * 

lcov results are shown in the attachments

  was:
Significant pieces of code in TcrMessage are not being tested. New tests should 
be written to test the following:
 * inline static ChunkObjectType readChunkPartHeader( 1259 : TcrMessage& msg, 
DataInput& input, DSCode expectedFirstType, 1260 : int32_t expectedPartType, 
const char* methodName, uint32_t& partLen, 1261 : uint8_t isLastChunk)
 * inline static ChunkObjectType readChunkPartHeader(TcrMessage& msg, 
DataInput& input, 1334 : const char* methodName, 1335 : uint32_t& partLen, 1336 
: uint8_t isLastChunk)
 * void TcrMessage::processChunk(const uint8_t* bytes, int32_t len, 724 : 
uint16_t endpointmemId, 725 : const uint8_t isLastChunkAndisSecurityHeader)

lcov results are shown in the attachments


> Create New Tests to Fix Coverage Holes in TcrMessage
> ----------------------------------------------------
>
>                 Key: GEODE-5837
>                 URL: https://issues.apache.org/jira/browse/GEODE-5837
>             Project: Geode
>          Issue Type: Task
>          Components: native client
>            Reporter: Michael Martell
>            Priority: Major
>         Attachments: TcrMessage.cpp.gcov.html, TcrMessage.hpp.gcov.html
>
>
> Significant pieces of code in TcrMessage are not being tested. New tests 
> should be written to test the following:
>  * inline static ChunkObjectType readChunkPartHeader( 1259 : TcrMessage& msg, 
> DataInput& input, DSCode expectedFirstType, 1260 : int32_t expectedPartType, 
> const char* methodName, uint32_t& partLen, 1261 : uint8_t isLastChunk)
>  * inline static ChunkObjectType readChunkPartHeader(TcrMessage& msg, 
> DataInput& input, 1334 : const char* methodName, 1335 : uint32_t& partLen, 
> 1336 : uint8_t isLastChunk)
>  * void TcrMessage::processChunk(const uint8_t* bytes, int32_t len, 724 : 
> uint16_t endpointmemId, 725 : const uint8_t isLastChunkAndisSecurityHeader)
>  * 
>  void TcrMessage::readOldValue(DataInput& input)
>  * 
> void TcrMessage::readLongPart(DataInput& input, uint64_t* intValue) 
>  * 
> inline void TcrMessage::readCallbackObjectPart(DataInput& input,     227      
>        :                                                bool defaultString)
>  * 
> void TcrMessage::chunkSecurityHeader(int skipPart, const uint8_t* bytes,     
> 884             :                                      int32_t len,     885   
>           :                                      uint8_t 
> isLastChunkAndSecurityHeader)
>  * 
> void TcrMessage::handleByteArrayResponse(     896             :     const 
> char* bytearray, int32_t len, uint16_t endpointMemId,     897             :   
>   const SerializationRegistry& serializationRegistry,     898             :   
>   MemberListForVersionStamp& memberListForVersionStamp)
>  * 
> TcrMessageClearRegion::TcrMessageClearRegion(    1401             :     
> DataOutput* dataOutput, const Region* region,    1402             :     const 
> std::shared_ptr<Serializable>& aCallbackArgument,    1403             :     
> std::chrono::milliseconds messageResponsetimeout,    1404           6 :     
> ThinClientBaseDM* connectionDM)
>  * 
> TcrMessageGetDurableCqs::TcrMessageGetDurableCqs(    1599           0 :     
> DataOutput* dataOutput, ThinClientBaseDM* connectionDM) {    1600           0 
> :   m_request.reset(dataOutput)
>  * 
> TcrMessageCreateRegion::TcrMessageCreateRegion(    1938             :     
> DataOutput* dataOutput, const std::string& str1, const std::string& str2,    
> 1939           0 :     bool isDurable, bool receiveValues, ThinClientBaseDM* 
> connectionDM)
>  * 
> TcrMessageTxSynchronization::TcrMessageTxSynchronization(DataOutput* 
> dataOutput,    2015             :                                             
>              int ordinal, int txid,    2016           0 :                     
>                                      int status)
>  * 
> TcrMessageTxFailover::TcrMessageTxFailover(DataOutput* dataOutput) {    2061  
>          0 :   m_msgType = TcrMessage::TX_FAILOVER;    2062           0 :   
> m_request.reset(dataOutput)
>  * 
> TcrMessageSize::TcrMessageSize(DataOutput* dataOutput, const char* 
> regionName) {    2484           0 :   m_request.reset(dataOutput
>  * 
> TcrMessageRemoveUserAuth::TcrMessageRemoveUserAuth(    2516           0 :     
> DataOutput* dataOutput, bool keepAlive, ThinClientBaseDM* connectionDM) {    
> 2517           0 :   m_request.reset(dataOutput)
>  * 
> void TcrMessage::addSecurityPart(int64_t connectionId, int64_t unique_id,    
> 2558             :                                  TcrConnection* conn)
>  * 
> void TcrMessage::addSecurityPart(int64_t connectionId, TcrConnection* conn)
>  * 
> TcrMessageAddPdxEnum::TcrMessageAddPdxEnum(    2685             :     
> DataOutput* dataOutput, const std::shared_ptr<Cacheable>& pdxType,    2686    
>        0 :     ThinClientBaseDM* connectionDM, int32_t pdxTypeId)
>  * 
> void TcrMessage::readEventIdPart(DataInput& input, bool skip, int32_t parts)
>  * 
> std::shared_ptr<DSMemberForVersionStamp> TcrMessage::readDSMember(    2874    
>          :     apache::geode::client::DataInput& input)
>  * 
> void TcrMessage::readHashMapForGCVersions(    2904             :     
> apache::geode::client::DataInput& input,    2905             :     
> std::shared_ptr<CacheableHashMap>& value)
>  * 
> lcov results are shown in the attachments



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to