From 2fe020f4bc86b7dcecc4a8853b7f772b591a010c Mon Sep 17 00:00:00 2001 From: Oleksii Beketov Date: Mon, 17 Oct 2016 20:05:01 +0300 Subject: [PATCH] Unit tests for SSL adapter update Change-Id: Ib108dd1ce76632f1393383e6402e73c7ba2e60d7 Signed-off-by: Oleksii Beketov Reviewed-on: https://gerrit.iotivity.org/gerrit/13349 Tested-by: jenkins-iotivity Reviewed-by: Randeep Singh --- resource/csdk/connectivity/test/SConscript | 2 +- resource/csdk/connectivity/test/ssladapter_test.cpp | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/resource/csdk/connectivity/test/SConscript b/resource/csdk/connectivity/test/SConscript index 2289c8b..27fa636 100644 --- a/resource/csdk/connectivity/test/SConscript +++ b/resource/csdk/connectivity/test/SConscript @@ -82,7 +82,7 @@ if (('IP' in target_transport) or ('ALL' in target_transport)): if target_os != 'arduino': tests_src = tests_src + ['cablocktransfertest.cpp'] -if catest_env.get('SECURED') == '1': +if catest_env.get('SECURED') == '1' and catest_env.get('WITH_TCP') == True: tests_src = tests_src + ['ssladapter_test.cpp'] catests = catest_env.Program('catests', tests_src) diff --git a/resource/csdk/connectivity/test/ssladapter_test.cpp b/resource/csdk/connectivity/test/ssladapter_test.cpp index 970aa89..21dc536 100644 --- a/resource/csdk/connectivity/test/ssladapter_test.cpp +++ b/resource/csdk/connectivity/test/ssladapter_test.cpp @@ -1439,7 +1439,7 @@ TEST(TLSAdaper, Test_3_0) exit(EXIT_FAILURE); } - sleep(1); + sleep(5); ret = pthread_create( &thread2, NULL, test0CAinitiateSslHandshake, &arg); if(ret) @@ -1448,7 +1448,7 @@ TEST(TLSAdaper, Test_3_0) exit(EXIT_FAILURE); } - sleep(1); + sleep(5); EXPECT_EQ(0, arg); } @@ -1588,7 +1588,7 @@ TEST(TLSAdaper, Test_4) exit(EXIT_FAILURE); } - sleep(1); + sleep(5); ret = pthread_create( &thread2, NULL, testCAencryptSsl, &arg); if(ret) @@ -1597,7 +1597,7 @@ TEST(TLSAdaper, Test_4) exit(EXIT_FAILURE); } - sleep(1); + sleep(5); EXPECT_EQ(0, arg); } @@ -1735,7 +1735,7 @@ TEST(TLSAdaper, Test_5) exit(EXIT_FAILURE); } - sleep(1); + sleep(5); ret = pthread_create( &thread2, NULL, testCAdecryptSsl, &arg); if(ret) @@ -1744,7 +1744,7 @@ TEST(TLSAdaper, Test_5) exit(EXIT_FAILURE); } - sleep(1); + sleep(5); EXPECT_EQ(0, arg); } @@ -1920,7 +1920,7 @@ TEST(TLSAdaper, Test_7) exit(EXIT_FAILURE); } - sleep(1); + sleep(5); ret = pthread_create( &thread2, NULL, client, (void*) NULL); if (ret) @@ -1929,7 +1929,7 @@ TEST(TLSAdaper, Test_7) exit(EXIT_FAILURE); } - sleep(1); + sleep(5); EXPECT_EQ(NULL, arg); } @@ -2224,7 +2224,7 @@ TEST(TLSAdaper, Test_11) exit(EXIT_FAILURE); } - sleep(1); + sleep(5); ret = pthread_create( &thread2, NULL, testCAsslGenerateOwnerPsk, &arg); if(ret) @@ -2233,7 +2233,7 @@ TEST(TLSAdaper, Test_11) exit(EXIT_FAILURE); } - sleep(1); + sleep(5); EXPECT_EQ(0, arg); } -- 2.7.4