From 14fb88aaf2f7016622ab86d09b495d15e7fb0838 Mon Sep 17 00:00:00 2001 From: KIM JungYong Date: Thu, 13 Apr 2017 15:15:12 +0900 Subject: [PATCH] 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 --- service/notification/cpp-wrapper/unittest/NSConsumerServiceTest2.cpp | 2 -- .../notification/cpp-wrapper/unittest/NSProviderServiceSimulator.h | 2 +- service/notification/src/consumer/NSConsumerCommunication.c | 4 ---- service/notification/unittest/NSProviderSimulator.h | 2 +- 4 files changed, 2 insertions(+), 8 deletions(-) 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")), -- 2.7.4