Commit 7b9ca77b authored by KIM JungYong's avatar KIM JungYong Committed by Uze Choi

Modify RE cache callback function.

https://jira.iotivity.org/browse/IOT-2093

RE cache callback was not report error and error code

In this patch,
1. RE cache callback was changed to call on error including error code.
  std::function< void(const RCSResourceAttributes& attrs, int eCode) >
  CacheUpdatedCallback;
2. Related unit test and sample was updated.
3. Related other service was updated.

Change-Id: Iafb16d3025c491c45e70bbe347ce72b61a82aae2
Signed-off-by: default avatarKIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19109Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
Tested-by: default avatarUze Choi <uzchoi@samsung.com>
parent fd60586e
...@@ -30,7 +30,7 @@ RemoteResourceUnit::RemoteResourceUnit() ...@@ -30,7 +30,7 @@ RemoteResourceUnit::RemoteResourceUnit()
pStateChangedCB = std::bind(&RemoteResourceUnit::stateChangedCB, this, pStateChangedCB = std::bind(&RemoteResourceUnit::stateChangedCB, this,
std::placeholders::_1); std::placeholders::_1);
pCacheUpdateCB = std::bind(&RemoteResourceUnit::cacheUpdateCB, this, pCacheUpdateCB = std::bind(&RemoteResourceUnit::cacheUpdateCB, this,
std::placeholders::_1); std::placeholders::_1, std::placeholders::_2);
} }
RemoteResourceUnit::~RemoteResourceUnit() RemoteResourceUnit::~RemoteResourceUnit()
...@@ -115,7 +115,7 @@ void RemoteResourceUnit::stateChangedCB(ResourceState changedState) const ...@@ -115,7 +115,7 @@ void RemoteResourceUnit::stateChangedCB(ResourceState changedState) const
} }
} }
void RemoteResourceUnit::cacheUpdateCB(const RCSResourceAttributes & updatedAtt) const void RemoteResourceUnit::cacheUpdateCB(const RCSResourceAttributes & updatedAtt, int) const
{ {
std::lock_guard<std::mutex> lock(m_mutex); std::lock_guard<std::mutex> lock(m_mutex);
(void)updatedAtt; (void)updatedAtt;
......
...@@ -54,7 +54,7 @@ namespace OIC ...@@ -54,7 +54,7 @@ namespace OIC
RCSRemoteResourceObject::CacheUpdatedCallback pCacheUpdateCB; RCSRemoteResourceObject::CacheUpdatedCallback pCacheUpdateCB;
void stateChangedCB(ResourceState changedState) const; void stateChangedCB(ResourceState changedState) const;
void cacheUpdateCB(const RCSResourceAttributes & updatedAtt) const; void cacheUpdateCB(const RCSResourceAttributes & updatedAtt, int) const;
public: public:
static RemoteResourceUnit::Ptr createRemoteResourceInfo( static RemoteResourceUnit::Ptr createRemoteResourceInfo(
......
...@@ -735,7 +735,7 @@ TEST_F(DiscoverResourceUnitTest, onUpdateCalled) ...@@ -735,7 +735,7 @@ TEST_F(DiscoverResourceUnitTest, onUpdateCalled)
namespace namespace
{ {
void onCacheCB(const RCSResourceAttributes &) void onCacheCB(const RCSResourceAttributes &, int)
{ {
} }
} }
...@@ -814,7 +814,7 @@ TEST_F(RemoteResourceUnitTest, onCacheCBCalled) ...@@ -814,7 +814,7 @@ TEST_F(RemoteResourceUnitTest, onCacheCBCalled)
{ {
bool isCalled = false; bool isCalled = false;
mocks.ExpectCallFunc(onCacheCB).Do( mocks.ExpectCallFunc(onCacheCB).Do(
[this, &isCalled](const RCSResourceAttributes &) [this, &isCalled](const RCSResourceAttributes &, int)
{ {
isCalled = true; isCalled = true;
}); });
......
...@@ -148,7 +148,7 @@ public final class RcsRemoteResourceObject extends RcsObject { ...@@ -148,7 +148,7 @@ public final class RcsRemoteResourceObject extends RcsObject {
* the updated attributes * the updated attributes
* *
*/ */
public void onCacheUpdated(RcsResourceAttributes attributes); public void onCacheUpdated(RcsResourceAttributes attributes, int eCode);
} }
......
...@@ -135,7 +135,8 @@ namespace ...@@ -135,7 +135,8 @@ namespace
} }
} }
void onCacheUpdated(const RCSResourceAttributes& attrs, const JavaGlobalRef& listener) void onCacheUpdated(const RCSResourceAttributes& attrs, int eCode,
const JavaGlobalRef& listener)
{ {
LOGD("onCacheUpdated"); LOGD("onCacheUpdated");
...@@ -186,7 +187,7 @@ void initRCSRemoteResourceObject(JNIEnvWrapper* env) ...@@ -186,7 +187,7 @@ void initRCSRemoteResourceObject(JNIEnvWrapper* env)
auto clsOnCacheUpdatedListener = env->FindClass(CLS_NAME_ON_CACHE_UPDATED_LISTENER); auto clsOnCacheUpdatedListener = env->FindClass(CLS_NAME_ON_CACHE_UPDATED_LISTENER);
g_method_onCacheUpdated = env->GetMethodID(clsOnCacheUpdatedListener, "onCacheUpdated", g_method_onCacheUpdated = env->GetMethodID(clsOnCacheUpdatedListener, "onCacheUpdated",
"(" AS_SIG(CLS_NAME_RESOURCEATTRIBUTES) ")V"); "(" AS_SIG(CLS_NAME_RESOURCEATTRIBUTES) "I)V");
auto clsOnRemoteAttributesReceivedListener = auto clsOnRemoteAttributesReceivedListener =
env->FindClass(CLS_NAME_ON_REMOTE_ATTRIBUTES_RECEIVED_LISTENER); env->FindClass(CLS_NAME_ON_REMOTE_ATTRIBUTES_RECEIVED_LISTENER);
...@@ -341,7 +342,8 @@ Java_org_iotivity_service_client_RcsRemoteResourceObject_nativeStartCaching ...@@ -341,7 +342,8 @@ Java_org_iotivity_service_client_RcsRemoteResourceObject_nativeStartCaching
if (listener) if (listener)
{ {
res->startCaching(std::bind(onCacheUpdated, res->startCaching(std::bind(onCacheUpdated,
std::placeholders::_1, JavaGlobalRef{ env, listener })); std::placeholders::_1, std::placeholders::_2,
JavaGlobalRef{ env, listener }));
} }
else else
{ {
......
...@@ -112,7 +112,7 @@ public class ResourceClientActivity extends Activity ...@@ -112,7 +112,7 @@ public class ResourceClientActivity extends Activity
private OnCacheUpdatedListener mOnCacheUpdatedListener = new OnCacheUpdatedListener() { private OnCacheUpdatedListener mOnCacheUpdatedListener = new OnCacheUpdatedListener() {
@Override @Override
public void onCacheUpdated(RcsResourceAttributes attrs) { public void onCacheUpdated(RcsResourceAttributes attrs, int eCode) {
Log.i(LOG_TAG, "onCacheUpdated"); Log.i(LOG_TAG, "onCacheUpdated");
mHandler.obtainMessage(MSG_ID_ATTRIBUTE_RECEIVED, attrs) mHandler.obtainMessage(MSG_ID_ATTRIBUTE_RECEIVED, attrs)
......
...@@ -270,9 +270,9 @@ void onResourceStateChanged(ResourceState resourceState) ...@@ -270,9 +270,9 @@ void onResourceStateChanged(ResourceState resourceState)
} }
} }
void onCacheUpdated(const RCSResourceAttributes& attributes) void onCacheUpdated(const RCSResourceAttributes& attributes, int eCode)
{ {
std::cout << "onCacheUpdated callback" << std::endl; std::cout << "onCacheUpdated callback : " << eCode << std::endl;
printAttributes(attributes); printAttributes(attributes);
} }
......
...@@ -127,7 +127,7 @@ void onResourceStateChanged(const ResourceState &resourceState) ...@@ -127,7 +127,7 @@ void onResourceStateChanged(const ResourceState &resourceState)
&logMessage); &logMessage);
} }
void onCacheUpdated(const RCSResourceAttributes &attributes) void onCacheUpdated(const RCSResourceAttributes &attributes, int)
{ {
dlog_print(DLOG_INFO, LOG_TAG, "#### onCacheUpdated callback"); dlog_print(DLOG_INFO, LOG_TAG, "#### onCacheUpdated callback");
...@@ -277,7 +277,7 @@ static void setAttributeToRemoteServer(int setValue) ...@@ -277,7 +277,7 @@ static void setAttributeToRemoteServer(int setValue)
&logMessage); &logMessage);
} }
static void startCaching(std::function <void (const RCSResourceAttributes &)>cb) static void startCaching(std::function <void (const RCSResourceAttributes &, int)>cb)
{ {
string logMessage = ""; string logMessage = "";
......
...@@ -187,7 +187,8 @@ namespace OIC ...@@ -187,7 +187,8 @@ namespace OIC
* *
* @param attrs the updated attributes * @param attrs the updated attributes
*/ */
typedef std::function< void(const RCSResourceAttributes& attrs) > CacheUpdatedCallback; typedef std::function< void(const RCSResourceAttributes& attrs, int eCode) >
CacheUpdatedCallback;
/** /**
* Callback definition to be invoked when the response of getRemoteAttributes is * Callback definition to be invoked when the response of getRemoteAttributes is
......
...@@ -82,7 +82,7 @@ namespace OIC ...@@ -82,7 +82,7 @@ namespace OIC
typedef int CacheID; typedef int CacheID;
typedef std::function<OCStackResult(std::shared_ptr<PrimitiveResource>, typedef std::function<OCStackResult(std::shared_ptr<PrimitiveResource>,
const RCSResourceAttributes &)> CacheCB; const RCSResourceAttributes &, int eCode)> CacheCB;
typedef std::map<int, std::pair<Report_Info, CacheCB>> SubscriberInfo; typedef std::map<int, std::pair<Report_Info, CacheCB>> SubscriberInfo;
typedef std::pair<int, std::pair<Report_Info, CacheCB>> SubscriberInfoPair; typedef std::pair<int, std::pair<Report_Info, CacheCB>> SubscriberInfoPair;
......
...@@ -98,7 +98,7 @@ namespace OIC ...@@ -98,7 +98,7 @@ namespace OIC
CacheID generateCacheID(); CacheID generateCacheID();
SubscriberInfoPair findSubscriber(CacheID id); SubscriberInfoPair findSubscriber(CacheID id);
void notifyObservers(const RCSResourceAttributes Att); void notifyObservers(const RCSResourceAttributes Att, int eCode);
}; };
} // namespace Service } // namespace Service
} // namespace OIC } // namespace OIC
......
...@@ -39,7 +39,7 @@ namespace OIC ...@@ -39,7 +39,7 @@ namespace OIC
{ {
public: public:
typedef std::function<OCStackResult(std::shared_ptr<PrimitiveResource>, typedef std::function<OCStackResult(std::shared_ptr<PrimitiveResource>,
const RCSResourceAttributes &)> DataCacheCB; const RCSResourceAttributes &, int)> DataCacheCB;
typedef std::shared_ptr<ObserveCache> Ptr; typedef std::shared_ptr<ObserveCache> Ptr;
public: public:
......
...@@ -208,14 +208,7 @@ namespace OIC ...@@ -208,14 +208,7 @@ namespace OIC
const ResponseStatement &_rep, int _result, unsigned int _seq) const ResponseStatement &_rep, int _result, unsigned int _seq)
{ {
if (_result != OC_STACK_OK || _rep.getAttributes().empty() || lastSequenceNum > _seq) lastSequenceNum = _seq;
{
return;
}
else
{
lastSequenceNum = _seq;
}
if (state != CACHE_STATE::READY) if (state != CACHE_STATE::READY)
{ {
...@@ -231,7 +224,7 @@ namespace OIC ...@@ -231,7 +224,7 @@ namespace OIC
networkTimer.cancel(networkTimeOutHandle); networkTimer.cancel(networkTimeOutHandle);
networkTimeOutHandle = networkTimer.post(CACHE_DEFAULT_EXPIRED_MILLITIME, pTimerCB); networkTimeOutHandle = networkTimer.post(CACHE_DEFAULT_EXPIRED_MILLITIME, pTimerCB);
notifyObservers(_rep.getAttributes()); notifyObservers(_rep.getAttributes(), _result);
} }
void DataCache::onGet(const HeaderOptions & /*_hos*/, void DataCache::onGet(const HeaderOptions & /*_hos*/,
...@@ -257,10 +250,10 @@ namespace OIC ...@@ -257,10 +250,10 @@ namespace OIC
pollingHandle = pollingTimer.post(CACHE_DEFAULT_REPORT_MILLITIME, pPollingCB); pollingHandle = pollingTimer.post(CACHE_DEFAULT_REPORT_MILLITIME, pPollingCB);
} }
notifyObservers(_rep.getAttributes()); notifyObservers(_rep.getAttributes(), _result);
} }
void DataCache::notifyObservers(const RCSResourceAttributes Att) void DataCache::notifyObservers(const RCSResourceAttributes Att, int eCode)
{ {
{ {
std::lock_guard<std::mutex> lock(att_mutex); std::lock_guard<std::mutex> lock(att_mutex);
...@@ -276,7 +269,7 @@ namespace OIC ...@@ -276,7 +269,7 @@ namespace OIC
{ {
if (i.second.first.rf == REPORT_FREQUENCY::UPTODATE) if (i.second.first.rf == REPORT_FREQUENCY::UPTODATE)
{ {
i.second.second(this->sResource, Att); i.second.second(this->sResource, Att, eCode);
} }
} }
} }
......
...@@ -102,22 +102,18 @@ namespace OIC ...@@ -102,22 +102,18 @@ namespace OIC
void ObserveCache::onObserve(const HeaderOptions &, void ObserveCache::onObserve(const HeaderOptions &,
const ResponseStatement & rep, int _result, unsigned int) const ResponseStatement & rep, int _result, unsigned int)
{ {
if (!convertOCResultToSuccess((OCStackResult)_result))
{
return;
}
m_state = CACHE_STATE::READY; m_state = CACHE_STATE::READY;
if (m_attributes == rep.getAttributes()) if (m_attributes == rep.getAttributes() &&
convertOCResultToSuccess((OCStackResult)_result))
{ {
return ; return ;
} }
m_attributes = rep.getAttributes();
if (m_reportCB) if (m_reportCB)
{ {
m_reportCB(m_wpResource.lock(), m_attributes); m_attributes = rep.getAttributes();
m_reportCB(m_wpResource.lock(), m_attributes, _result);
} }
} }
......
...@@ -74,7 +74,8 @@ class DataCacheTest : public TestWithMock ...@@ -74,7 +74,8 @@ class DataCacheTest : public TestWithMock
mocks.OnCall(pResource.get(), PrimitiveResource::isObservable).Return(false); mocks.OnCall(pResource.get(), PrimitiveResource::isObservable).Return(false);
cacheHandler.reset(new DataCache()); cacheHandler.reset(new DataCache());
cb = ([](std::shared_ptr<PrimitiveResource >, const RCSResourceAttributes &)->OCStackResult cb = ([](std::shared_ptr<PrimitiveResource >,
const RCSResourceAttributes &, int) -> OCStackResult
{ {
return OC_STACK_OK; return OC_STACK_OK;
}); });
......
...@@ -51,7 +51,8 @@ class ResourceCacheManagerTest : public TestWithMock ...@@ -51,7 +51,8 @@ class ResourceCacheManagerTest : public TestWithMock
pResource = PrimitiveResource::Ptr(mocks.Mock< PrimitiveResource >(), deleter); pResource = PrimitiveResource::Ptr(mocks.Mock< PrimitiveResource >(), deleter);
}); });
mocks.OnCall(pResource.get(), PrimitiveResource::isObservable).Return(false); mocks.OnCall(pResource.get(), PrimitiveResource::isObservable).Return(false);
cb = ([](std::shared_ptr<PrimitiveResource >, const RCSResourceAttributes &)->OCStackResult cb = ([](std::shared_ptr<PrimitiveResource >,
const RCSResourceAttributes &, int) -> OCStackResult
{ {
return OC_STACK_OK; return OC_STACK_OK;
}); });
......
...@@ -92,12 +92,12 @@ namespace ...@@ -92,12 +92,12 @@ namespace
} }
OCStackResult cachingCallback(std::shared_ptr< PrimitiveResource >, OCStackResult cachingCallback(std::shared_ptr< PrimitiveResource >,
const RCSResourceAttributes& data, const RCSResourceAttributes& data, int eCode,
RCSRemoteResourceObject::CacheUpdatedCallback onCacheUpdated) RCSRemoteResourceObject::CacheUpdatedCallback onCacheUpdated)
{ {
SCOPE_LOG_F(DEBUG, TAG); SCOPE_LOG_F(DEBUG, TAG);
onCacheUpdated(data); onCacheUpdated(data, eCode);
return OC_STACK_OK; return OC_STACK_OK;
} }
...@@ -299,7 +299,8 @@ namespace OIC ...@@ -299,7 +299,8 @@ namespace OIC
{ {
m_cacheId = ResourceCacheManager::getInstance()->requestResourceCache( m_cacheId = ResourceCacheManager::getInstance()->requestResourceCache(
m_primitiveResource, m_primitiveResource,
std::bind(cachingCallback, std::placeholders::_1, std::placeholders::_2, std::bind(cachingCallback, std::placeholders::_1,
std::placeholders::_2, std::placeholders::_3,
std::move(cb)), CACHE_METHOD::OBSERVE_ONLY, std::move(cb)), CACHE_METHOD::OBSERVE_ONLY,
REPORT_FREQUENCY::UPTODATE, 0); REPORT_FREQUENCY::UPTODATE, 0);
} }
...@@ -308,7 +309,8 @@ namespace OIC ...@@ -308,7 +309,8 @@ namespace OIC
{ {
m_cacheId = ResourceCacheManager::getInstance()->requestResourceCache( m_cacheId = ResourceCacheManager::getInstance()->requestResourceCache(
m_primitiveResource, m_primitiveResource,
std::bind(cachingCallback, std::placeholders::_1, std::placeholders::_2, std::bind(cachingCallback, std::placeholders::_1,
std::placeholders::_2, std::placeholders::_3,
std::move(cb)), CACHE_METHOD::ITERATED_GET, std::move(cb)), CACHE_METHOD::ITERATED_GET,
REPORT_FREQUENCY::UPTODATE, 0); REPORT_FREQUENCY::UPTODATE, 0);
} }
......
...@@ -47,7 +47,7 @@ void getRemoteAttributesCallback(const RCSResourceAttributes&, int) {} ...@@ -47,7 +47,7 @@ void getRemoteAttributesCallback(const RCSResourceAttributes&, int) {}
void setRemoteAttributesCallback(const RCSResourceAttributes&, int) {} void setRemoteAttributesCallback(const RCSResourceAttributes&, int) {}
void setRemoteRepresentationCallback(const HeaderOpts&, const RCSRepresentation&, int) {} void setRemoteRepresentationCallback(const HeaderOpts&, const RCSRepresentation&, int) {}
void resourceStateChanged(ResourceState) { } void resourceStateChanged(ResourceState) { }
void cacheUpdatedCallback(const RCSResourceAttributes&) {} void cacheUpdatedCallback(const RCSResourceAttributes&, int) {}
class RemoteResourceObjectTest: public TestWithMock class RemoteResourceObjectTest: public TestWithMock
{ {
...@@ -294,7 +294,7 @@ TEST_F(RemoteResourceObjectTest, CacheStateIsUnreadyAfterStartCaching) ...@@ -294,7 +294,7 @@ TEST_F(RemoteResourceObjectTest, CacheStateIsUnreadyAfterStartCaching)
TEST_F(RemoteResourceObjectTest, CacheStateIsReadyAfterCacheUpdated) TEST_F(RemoteResourceObjectTest, CacheStateIsReadyAfterCacheUpdated)
{ {
mocks.ExpectCallFunc(cacheUpdatedCallback). mocks.ExpectCallFunc(cacheUpdatedCallback).
Do([this](const RCSResourceAttributes&){ Proceed(); }); Do([this](const RCSResourceAttributes&, int){ Proceed(); });
object->startCaching(cacheUpdatedCallback); object->startCaching(cacheUpdatedCallback);
Wait(); Wait();
...@@ -305,7 +305,7 @@ TEST_F(RemoteResourceObjectTest, CacheStateIsReadyAfterCacheUpdated) ...@@ -305,7 +305,7 @@ TEST_F(RemoteResourceObjectTest, CacheStateIsReadyAfterCacheUpdated)
TEST_F(RemoteResourceObjectTest, IsCachedAvailableReturnsTrueWhenCacheIsReady) TEST_F(RemoteResourceObjectTest, IsCachedAvailableReturnsTrueWhenCacheIsReady)
{ {
mocks.ExpectCallFunc(cacheUpdatedCallback). mocks.ExpectCallFunc(cacheUpdatedCallback).
Do([this](const RCSResourceAttributes&){ Proceed(); }); Do([this](const RCSResourceAttributes&, int){ Proceed(); });
object->startCaching(cacheUpdatedCallback); object->startCaching(cacheUpdatedCallback);
Wait(); Wait();
...@@ -316,12 +316,12 @@ TEST_F(RemoteResourceObjectTest, IsCachedAvailableReturnsTrueWhenCacheIsReady) ...@@ -316,12 +316,12 @@ TEST_F(RemoteResourceObjectTest, IsCachedAvailableReturnsTrueWhenCacheIsReady)
TEST_F(RemoteResourceObjectTest, DISABLED_CacheUpdatedCallbackBeCalledWheneverCacheUpdated) TEST_F(RemoteResourceObjectTest, DISABLED_CacheUpdatedCallbackBeCalledWheneverCacheUpdated)
{ {
mocks.OnCallFunc(cacheUpdatedCallback). mocks.OnCallFunc(cacheUpdatedCallback).
Do([this](const RCSResourceAttributes&){ Proceed(); }); Do([this](const RCSResourceAttributes&, int){ Proceed(); });
object->startCaching(cacheUpdatedCallback); object->startCaching(cacheUpdatedCallback);
Wait(); Wait();
mocks.ExpectCallFunc(cacheUpdatedCallback). mocks.ExpectCallFunc(cacheUpdatedCallback).
Do([this](const RCSResourceAttributes&){ Proceed(); }); Do([this](const RCSResourceAttributes&, int){ Proceed(); });
server->setAttribute(ATTR_KEY, ATTR_VALUE + 1); server->setAttribute(ATTR_KEY, ATTR_VALUE + 1);
...@@ -333,15 +333,15 @@ TEST_F(RemoteResourceObjectTest, DISABLED_CacheUpdatedCallbackBeCalledWithUpdate ...@@ -333,15 +333,15 @@ TEST_F(RemoteResourceObjectTest, DISABLED_CacheUpdatedCallbackBeCalledWithUpdate
constexpr int newValue = ATTR_VALUE + 1; constexpr int newValue = ATTR_VALUE + 1;
mocks.OnCallFunc(cacheUpdatedCallback). mocks.OnCallFunc(cacheUpdatedCallback).
Do([this](const RCSResourceAttributes&){ Proceed(); }); Do([this](const RCSResourceAttributes&, int){ Proceed(); });
object->startCaching(cacheUpdatedCallback); object->startCaching(cacheUpdatedCallback);
Wait(); Wait();
mocks.ExpectCallFunc(cacheUpdatedCallback). mocks.ExpectCallFunc(cacheUpdatedCallback).
Match([this](const RCSResourceAttributes& attrs){ Match([this](const RCSResourceAttributes& attrs, int){
return attrs.at(ATTR_KEY) == newValue; return attrs.at(ATTR_KEY) == newValue;
}). }).
Do([this](const RCSResourceAttributes&){ Proceed(); }); Do([this](const RCSResourceAttributes&, int){ Proceed(); });
server->setAttribute(ATTR_KEY, newValue); server->setAttribute(ATTR_KEY, newValue);
...@@ -356,7 +356,7 @@ TEST_F(RemoteResourceObjectTest, GetCachedAttributesThrowsIfCachingIsNotStarted) ...@@ -356,7 +356,7 @@ TEST_F(RemoteResourceObjectTest, GetCachedAttributesThrowsIfCachingIsNotStarted)
TEST_F(RemoteResourceObjectTest, CachedAttributesHasSameAttributesWithServer) TEST_F(RemoteResourceObjectTest, CachedAttributesHasSameAttributesWithServer)
{ {
mocks.OnCallFunc(cacheUpdatedCallback). mocks.OnCallFunc(cacheUpdatedCallback).
Do([this](const RCSResourceAttributes&){ Proceed(); }); Do([this](const RCSResourceAttributes&, int){ Proceed(); });
object->startCaching(cacheUpdatedCallback); object->startCaching(cacheUpdatedCallback);
Wait(); Wait();
...@@ -373,7 +373,7 @@ TEST_F(RemoteResourceObjectTest, GetCachedAttributeThrowsIfCachingIsNotStarted) ...@@ -373,7 +373,7 @@ TEST_F(RemoteResourceObjectTest, GetCachedAttributeThrowsIfCachingIsNotStarted)
TEST_F(RemoteResourceObjectTest, GetCachedAttributeThrowsIfKeyIsInvalid) TEST_F(RemoteResourceObjectTest, GetCachedAttributeThrowsIfKeyIsInvalid)
{ {
mocks.OnCallFunc(cacheUpdatedCallback). mocks.OnCallFunc(cacheUpdatedCallback).
Do([this](const RCSResourceAttributes&){ Proceed(); }); Do([this](const RCSResourceAttributes&, int){ Proceed(); });
object->startCaching(cacheUpdatedCallback); object->startCaching(cacheUpdatedCallback);
Wait(); Wait();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment