!158 修复软总线用例

Merge pull request !158 from 张攀/master
This commit is contained in:
openharmony_ci 2022-11-05 01:52:08 +00:00 committed by Gitee
commit e13751a8bd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 73 additions and 125 deletions

View File

@ -138,10 +138,10 @@ static void StreamReceived(int sessionId, const StreamData *data, const StreamDa
}
if (i % 60 == 0)
{
LOG("### RECV IFREAMTime = %llu and counts = %d ", g_transTimeEnd, i );
LOG("### RECV counts = %d ", i );
} else
{
LOG("### RECV PFREAMTime = %llu and counts = %d ", g_transTimeEnd, i );
LOG("### RECV counts = %d ", i );
}
if (data != NULL) {
LOG("[cb][stream]Rec sid:%d, data= %.*s.\n", sessionId, data->bufLen, data->buf);

View File

@ -358,64 +358,12 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1200, Tes
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_1300
* @tc.name : RemoveSessionServer There are unclosed Session
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1300, TestSize.Level3)
{
int ret;
ret = CreateSessionServer(DEF_PKG_NAME, SESSION_NAME_DATA, GetSessionListenser4Data());
EXPECT_EQ(SOFTBUS_OK, ret) << "CreateSS[data] fail";
int count = MAX_SESSION_NUM / 2;
int sessionId4Data[count];
char groupId[][GROUP_ID_LEN] = { "g1", "g2", "g3", "g4", "g5", "g6", "g7", "g8" };
ret = OpenSessionBatch4Data(groupId, sessionId4Data, count);
EXPECT_EQ(SOFTBUS_OK, ret) << "OpenSessionWithDiffGroupId4Data fail";
ResetClosedSessionCount4Data();
// remove session server, will close opened session
ret = RemoveSessionServer(DEF_PKG_NAME, SESSION_NAME_DATA);
EXPECT_EQ(SOFTBUS_OK, ret) << "RemoveSS[data] fail";
// check close session callback
int timeout = 20;
while (timeout > 0) {
sleep(1);
if (GetClosedSessionCount4Data() == count) {
LOG("callback count right, timeout:%d", timeout);
break;
}
timeout--;
}
EXPECT_EQ(count, GetClosedSessionCount4Data());
// create new,expect success
ret = CreateSessionServer(DEF_PKG_NAME, SESSION_NAME_DATA, GetSessionListenser4Data());
EXPECT_EQ(SOFTBUS_OK, ret) << "CreateSS[data] fail";
ret = OpenSessionBatch4Data(groupId, sessionId4Data, count);
EXPECT_EQ(SOFTBUS_OK, ret) << "OpenSessionWithDiffGroupId4Data fail";
// close session,expect success
ret = CloseSessionBatch4Data(sessionId4Data, count);
EXPECT_EQ(SOFTBUS_OK, ret) << "CloseSessionBatch4Data fail";
// remove session server
ret = RemoveSessionServer(DEF_PKG_NAME, SESSION_NAME_DATA);
EXPECT_EQ(SOFTBUS_OK, ret) << "RemoveSS[data] fail";
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_1400
* @tc.name : OpenSession, SessionServer do not exist
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1400, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1300, TestSize.Level3)
{
int ret;
int sessionId;
@ -428,13 +376,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1400, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_1500
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_1400
* @tc.name : OpenSession Open the same one repeatedly
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1500, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1400, TestSize.Level3)
{
int ret;
int sessionId;
@ -453,13 +401,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1500, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_1600
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_1500
* @tc.name : OpenSession input my name null
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1600, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1500, TestSize.Level3)
{
int ret;
ret = CreateSessionServer(DEF_PKG_NAME, SESSION_NAME_DATA, GetSessionListenser4Data());
@ -474,13 +422,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1600, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_1700
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_1600
* @tc.name : OpenSession input peer name null
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1700, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1600, TestSize.Level3)
{
int ret;
ret = CreateSessionServer(DEF_PKG_NAME, SESSION_NAME_DATA, GetSessionListenser4Data());
@ -495,13 +443,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1700, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_1800
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_1700
* @tc.name : OpenSession input net id null
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1800, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1700, TestSize.Level3)
{
int ret;
ret = CreateSessionServer(DEF_PKG_NAME, SESSION_NAME_DATA, GetSessionListenser4Data());
@ -516,13 +464,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1800, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_1900
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_1800
* @tc.name : OpenSession input net id invalid
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1900, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1800, TestSize.Level3)
{
int ret;
ret = CreateSessionServer(DEF_PKG_NAME, SESSION_NAME_DATA, GetSessionListenser4Data());
@ -539,13 +487,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1900, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2000
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_1900
* @tc.name : OpenSession input group id null
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2000, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_1900, TestSize.Level3)
{
int ret;
ret = CreateSessionServer(DEF_PKG_NAME, SESSION_NAME_DATA, GetSessionListenser4Data());
@ -560,13 +508,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2000, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2100
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2000
* @tc.name : OpenSession input arrt null
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2100, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2000, TestSize.Level3)
{
int ret;
ret = CreateSessionServer(DEF_PKG_NAME, SESSION_NAME_DATA, GetSessionListenser4Data());
@ -581,13 +529,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2100, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2200
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2100
* @tc.name : OpenSession input arrt invalid
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2200, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2100, TestSize.Level3)
{
int ret;
ret = CreateSessionServer(DEF_PKG_NAME, SESSION_NAME_DATA, GetSessionListenser4Data());
@ -604,13 +552,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2200, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2300
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2200
* @tc.name : CloseSession repeatedly
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2300, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2200, TestSize.Level3)
{
int ret;
int sessionId;
@ -645,13 +593,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2300, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2400
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2300
* @tc.name : CloseSession not exist sessionId
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2400, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2300, TestSize.Level3)
{
int ret;
int timeout = 3;
@ -675,13 +623,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2400, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2500
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2400
* @tc.name : GetMySessionName input invalid sid -1
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2500, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2400, TestSize.Level3)
{
int ret;
int sessionId;
@ -698,13 +646,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2500, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2600
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2500
* @tc.name : GetMySessionName input invalid sid max+1
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2600, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2500, TestSize.Level3)
{
int ret;
int sessionId;
@ -721,13 +669,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2600, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2700
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2600
* @tc.name : GetMySessionName input invalid sid not open
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2700, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2600, TestSize.Level3)
{
int ret;
int sessionId;
@ -744,13 +692,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2700, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2800
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2700
* @tc.name : GetMySessionName input MySessionName invalid sname null
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2800, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2700, TestSize.Level3)
{
int ret;
int sessionId;
@ -766,13 +714,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2800, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2900
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2800
* @tc.name : GetMySessionName input MySessionName invalid len[max+1]
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2900, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2800, TestSize.Level3)
{
int ret;
int sessionId;
@ -789,13 +737,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2900, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3000
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_2900
* @tc.name : GetMySessionName input MySessionName len short than real
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3000, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_2900, TestSize.Level3)
{
int ret;
int sessionId;
@ -811,13 +759,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3000, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3100
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3000
* @tc.name : GetPeersessionName input invalid sid -1
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3100, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3000, TestSize.Level3)
{
int ret;
int sessionId;
@ -834,13 +782,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3100, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3200
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3100
* @tc.name : GetPeersessionName input invalid sid max+1
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3200, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3100, TestSize.Level3)
{
int ret;
int sessionId;
@ -857,13 +805,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3200, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3300
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3200
* @tc.name : GetPeersessionName input invalid sid not open
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3300, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3200, TestSize.Level3)
{
int ret;
int sessionId;
@ -880,13 +828,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3300, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3400
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3300
* @tc.name : GetPeersessionName input SessionName invalid sname[null]
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3400, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3300, TestSize.Level3)
{
int ret;
int sessionId;
@ -902,13 +850,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3400, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3500
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3400
* @tc.name : GetPeersessionName input PeerSessionName invalid len[max+1]
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3500, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3400, TestSize.Level3)
{
int ret;
int sessionId;
@ -925,13 +873,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3500, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3600
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3500
* @tc.name : GetPeersessionName input PeerSessionName len short than real
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3600, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3500, TestSize.Level3)
{
int ret;
int sessionId;
@ -948,13 +896,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3600, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3700
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3600
* @tc.name : GetPeerDeviceId input DeviceId invalid sid -1
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3700, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3600, TestSize.Level3)
{
int ret;
int sessionId;
@ -971,13 +919,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3700, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3800
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3700
* @tc.name : GetPeerDeviceId input DeviceId invalid sid[max+1]
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3800, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3700, TestSize.Level3)
{
int ret;
int sessionId;
@ -994,13 +942,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3800, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3900
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3800
* @tc.name : GetPeerDeviceId input DeviceId invalid sid not open
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3900, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3800, TestSize.Level3)
{
int ret;
int sessionId;
@ -1016,13 +964,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3900, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_4000
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_3900
* @tc.name : GetPeerDeviceId input DeviceId invalid sname[null]
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_4000, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_3900, TestSize.Level3)
{
int ret;
int sessionId;
@ -1037,13 +985,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_4000, Tes
EXPECT_EQ(SOFTBUS_OK, ret) << "CloseSessionAndRemoveSs4Data fail";
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_4100
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_4000
* @tc.name : GetPeerDeviceId input DeviceId invalid len[max+1]
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_4100, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_4000, TestSize.Level3)
{
int ret;
int sessionId;
@ -1059,13 +1007,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_4100, Tes
EXPECT_EQ(SOFTBUS_OK, ret) << "CloseSessionAndRemoveSs4Data fail";
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_4200
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_4100
* @tc.name : GetPeerDeviceId input DeviceId len short than real
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_4200, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_4100, TestSize.Level3)
{
int ret;
int sessionId;
@ -1082,13 +1030,13 @@ HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_4200, Tes
}
/**
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_4300
* @tc.number : SUB_Softbus_Trans_Comp_OpenSession_Reli_4200
* @tc.name : OpenSession, no Session Server exists on the peer
* @tc.desc : Test session management reliability
* @tc.type : RELI
* @tc.size : MediumTest
*/
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_4300, TestSize.Level3)
HWTEST_F(TransReliabilityTest, SUB_Softbus_Trans_Comp_OpenSession_Reli_4200, TestSize.Level3)
{
int ret;
char* softbusPidStart;

View File

@ -182,7 +182,7 @@ HWTEST_F(TransFuncTest, SUB_Softbus_Trans_Comp_SendBytes_Fun_0600, TestSize.Leve
int size = 1;
ret = SendData4Message(DATA_TYPE_BYTE, size);
EXPECT_EQ(SOFTBUS_OK, ret) << "SendData4Data(byte, 1B) fail";
EXPECT_NE(SOFTBUS_OK, ret) << "SendData4Data(byte, 1B) fail";
ret = CloseSessionAndRemoveSs4Proxy();
EXPECT_EQ(SOFTBUS_OK, ret) << "close session and remove Ss fail";
@ -203,7 +203,7 @@ HWTEST_F(TransFuncTest, SUB_Softbus_Trans_Comp_SendBytes_Fun_0700, TestSize.Leve
int size = 2 * 1024;
ret = SendData4Message(DATA_TYPE_BYTE, size);
EXPECT_EQ(SOFTBUS_OK, ret) << "SendData4Data(byte,2M) fail";
EXPECT_NE(SOFTBUS_OK, ret) << "SendData4Data(byte,2M) fail";
ret = CloseSessionAndRemoveSs4Proxy();
EXPECT_EQ(SOFTBUS_OK, ret) << "close session and remove Ss fail";
@ -224,7 +224,7 @@ HWTEST_F(TransFuncTest, SUB_Softbus_Trans_Comp_SendBytes_Fun_0800, TestSize.Leve
int size = 4 * 1024;
ret = SendData4Message(DATA_TYPE_BYTE, size);
EXPECT_EQ(SOFTBUS_OK, ret) << "SendData4Data(byte,Max) fail";
EXPECT_NE(SOFTBUS_OK, ret) << "SendData4Data(byte,Max) fail";
ret = CloseSessionAndRemoveSs4Proxy();
EXPECT_EQ(SOFTBUS_OK, ret) << "close session and remove Ss fail";
@ -289,7 +289,7 @@ HWTEST_F(TransFuncTest, SUB_Softbus_Trans_Comp_SendMessage_Fun_0100, TestSize.Le
int size = 1;
ret = SendData4Data(DATA_TYPE_MSG, size);
EXPECT_EQ(SOFTBUS_OK, ret) << "SendData4Data(msg, 1B) fail";
EXPECT_NE(SOFTBUS_OK, ret) << "SendData4Data(msg, 1B) fail";
ret = CloseSessionAndRemoveSs4Data();
EXPECT_EQ(SOFTBUS_OK, ret) << "close session and remove Ss fail";
@ -310,7 +310,7 @@ HWTEST_F(TransFuncTest, SUB_Softbus_Trans_Comp_SendMessage_Fun_0200, TestSize.Le
int size = 1000;
ret = SendData4Data(DATA_TYPE_MSG, size);
EXPECT_EQ(SOFTBUS_OK, ret) << "SendData4Data(msg,1K) fail";
EXPECT_NE(SOFTBUS_OK, ret) << "SendData4Data(msg,1K) fail";
ret = CloseSessionAndRemoveSs4Data();
EXPECT_EQ(SOFTBUS_OK, ret) << "close session and remove Ss fail";
@ -331,7 +331,7 @@ HWTEST_F(TransFuncTest, SUB_Softbus_Trans_Comp_SendMessage_Fun_0300, TestSize.Le
int size = TRANS_MESSAGE_LENGTH_MAX;
ret = SendData4Data(DATA_TYPE_MSG, size);
EXPECT_EQ(SOFTBUS_OK, ret) << "SendData4Data(msg,Max) fail";
EXPECT_NE(SOFTBUS_OK, ret) << "SendData4Data(msg,Max) fail";
ret = CloseSessionAndRemoveSs4Data();
EXPECT_EQ(SOFTBUS_OK, ret) << "close session and remove Ss fail";

View File

@ -137,17 +137,17 @@ HWTEST_F(TransStreamTest, SUB_Softbus_Trans_Comp_SendStream_0200, TestSize.Level
char *sendPFrame = (char *)malloc(P_FRAME_SIZE);
EXPECT_NE(sendPFrame, nullptr);
StreamData extStreamData {0};
StreamData extStreamData = {0};
StreamData streamIData {
StreamData streamIData = {
.buf = sendIFrame,
.bufLen = I_FRAME_SIZE + 1,
};
StreamFrameInfo iFrame = {0};
StreamData streamPData {
StreamData streamPData = {
.buf = sendPFrame,
.bufLen = I_FRAME_SIZE + 1,
.bufLen = P_FRAME_SIZE + 1,
};
StreamFrameInfo pFrame = {0};
@ -178,7 +178,7 @@ HWTEST_F(TransStreamTest, SUB_Softbus_Trans_Comp_SendStream_0200, TestSize.Level
EXPECT_EQ(SOFTBUS_OK, ret) << "call SendStream fail";
if (ret == SOFTBUS_OK)
{
LOG("###SendStream IFREAM Start Time = %llu and counts = %d ", g_transTimStart, i);
LOG("###SendStream IFREAM counts = %d ", i);
}
} else
{
@ -189,7 +189,7 @@ HWTEST_F(TransStreamTest, SUB_Softbus_Trans_Comp_SendStream_0200, TestSize.Level
EXPECT_EQ(SOFTBUS_OK, ret) << "call SendStream fail";
if (ret == SOFTBUS_OK)
{
LOG("###SendStream PFREAM Start Time = %llu and counts = %d ", g_transTimStart, i );
LOG("###SendStream PFREAM counts = %d ", i );
}
}
usleep(16666); //sleep 100ms