From: KIM JungYong Date: Thu, 13 Apr 2017 06:15:12 +0000 (+0900) Subject: Fix bugs for invalid uri in notificaiton service. X-Git-Tag: 1.3.0~338 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=14fb88aaf2f7016622ab86d09b495d15e7fb0838;p=platform%2Fupstream%2Fiotivity.git Fix bugs for invalid uri in notificaiton service. [Problem] Notification service sync service does not working. [Reason] When notification service built with TEST=0 (by default), Sync resource uri was registered as invalid. [Fix] Divided sync resource uri for test, was combined. Change-Id: I979fd8169afc15cf747796894d98a1be9e9ef853 Signed-off-by: KIM JungYong Reviewed-on: https://gerrit.iotivity.org/gerrit/18885 Reviewed-by: Uze Choi Tested-by: jenkins-iotivity --- diff --git a/service/notification/cpp-wrapper/unittest/NSConsumerServiceTest2.cpp b/service/notification/cpp-wrapper/unittest/NSConsumerServiceTest2.cpp index b0e4e6f..3bec0be 100644 --- a/service/notification/cpp-wrapper/unittest/NSConsumerServiceTest2.cpp +++ b/service/notification/cpp-wrapper/unittest/NSConsumerServiceTest2.cpp @@ -264,8 +264,6 @@ TEST_F(NotificationServiceConsumerTest, ExpectSuccessSendSyncInfo) TEST_F(NotificationServiceConsumerTest, ExpectSuccessGetTopicsList) { - uint64_t msgId = 10; - OIC::Service::NSResult res = OIC::Service::NSResult::FAIL; std::string provId; ::NSProvider *provider = (::NSProvider *)malloc(sizeof(::NSProvider)); diff --git a/service/notification/cpp-wrapper/unittest/NSProviderServiceSimulator.h b/service/notification/cpp-wrapper/unittest/NSProviderServiceSimulator.h index 79b0b1a..edfa90c 100644 --- a/service/notification/cpp-wrapper/unittest/NSProviderServiceSimulator.h +++ b/service/notification/cpp-wrapper/unittest/NSProviderServiceSimulator.h @@ -81,7 +81,7 @@ class NSProviderSimulator NSProviderSimulator() : m_notificationHandle(), m_messageHandle(), m_syncHandle(), m_topicHandle(), m_syncRep(), m_messageRep(), m_accepter(0), - m_notificationUri(std::string("/notificationTest")), + m_notificationUri(std::string("/notification")), m_messageUri(std::string("/message")), m_syncUri(std::string("/sync")), m_topicUri(std::string("/topic")), diff --git a/service/notification/src/consumer/NSConsumerCommunication.c b/service/notification/src/consumer/NSConsumerCommunication.c index 0d74c56..38a022e 100644 --- a/service/notification/src/consumer/NSConsumerCommunication.c +++ b/service/notification/src/consumer/NSConsumerCommunication.c @@ -27,11 +27,7 @@ #include "oic_string.h" #include "ocpayload.h" -#ifdef LOCAL_RUNNING #define NS_SYNC_URI "/notification/sync" -#else -#define NS_SYNC_URI "/notificationTest/sync" -#endif NSSyncInfo * NSCreateSyncInfo_consumer(uint64_t msgId, const char * providerId, NSSyncType state); diff --git a/service/notification/unittest/NSProviderSimulator.h b/service/notification/unittest/NSProviderSimulator.h index c66dc37..909a8a6 100644 --- a/service/notification/unittest/NSProviderSimulator.h +++ b/service/notification/unittest/NSProviderSimulator.h @@ -80,7 +80,7 @@ public: NSProviderSimulator() : m_notificationHandle(), m_messageHandle(), m_syncHandle(), m_topicHandle(), m_syncRep(), m_messageRep(), m_accepter(0), - m_notificationUri(std::string("/notificationTest")), + m_notificationUri(std::string("/notification")), m_messageUri(std::string("/message")), m_syncUri(std::string("/sync")), m_topicUri(std::string("/topic")),