-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow to send to CB batch update for multimeasures (and sort them by TimeInstant) #1607
allow to send to CB batch update for multimeasures (and sort them by TimeInstant) #1607
Conversation
It would be great if @mapedraza could have a look specially from the functional test and documentation perspective. |
id: 'TestType:TestDevice1', | ||
type: globalEnv.entity_type, | ||
a: { | ||
a1: { | ||
value: 23, | ||
type: 'Text', | ||
metadata: { | ||
TimeInstant: { | ||
value: _.isDateString, | ||
value: '2011-01-01T01:11:11.111Z', | ||
type: 'DateTime' | ||
} | ||
} | ||
}, | ||
TimeInstant: { | ||
value: _.isDateString, | ||
value: '2011-01-01T01:11:11.111Z', | ||
type: 'DateTime' | ||
} | ||
}, | ||
{ | ||
id: 'TestType:TestDevice1', | ||
id: 'TestType:TestDevice2', | ||
type: globalEnv.entity_type, | ||
a1: { | ||
a2: { | ||
value: 23, | ||
type: 'Text', | ||
metadata: { | ||
TimeInstant: { | ||
value: '2011-01-01T01:11:11.111Z', | ||
value: '2022-02-02T02:22:22.222Z', | ||
type: 'DateTime' | ||
} | ||
} | ||
}, | ||
TimeInstant: { | ||
value: '2011-01-01T01:11:11.111Z', | ||
value: '2022-02-02T02:22:22.222Z', | ||
type: 'DateTime' | ||
} | ||
}, | ||
{ | ||
id: 'TestType:TestDevice2', | ||
id: globalEnv.entity_name, | ||
type: globalEnv.entity_type, | ||
a2: { | ||
a: { | ||
value: 23, | ||
type: 'Text', | ||
metadata: { | ||
TimeInstant: { | ||
value: '2022-02-02T02:22:22.222Z', | ||
value: _.isDateString, | ||
type: 'DateTime' | ||
} | ||
} | ||
}, | ||
TimeInstant: { | ||
value: '2022-02-02T02:22:22.222Z', | ||
value: _.isDateString, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part of the code didn't change. NTC
@@ -1044,6 +1045,127 @@ Some additional considerations to take into account: | |||
measure of after a mapping, as described in the previous bullet) then it is refused (so a failover to server | |||
timestamp will take place). | |||
|
|||
## Multimeasure support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this doc be linked from IoTA JSON?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not fully sure as I don't have how the IOTA JSON doc is structured right now in my mind :) but could make sense...
Maybe you could propose a PR in the IOTA-JSON repo to see how it looks like, pls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
{ | ||
shouldName: | ||
'A - WHEN sending defined object_ids (measures) through http IT should send measures to Context Broker preserving value types and name mappings', | ||
type: 'multimeasure', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that multimeasure
is not included in the documentation at https://github.com/telefonicaid/iotagent-node-lib/tree/master/test/functional/README.md
type
: The type of the test case. This can besingle
ormultientity
. See the "Advanced features" section for more information.
If we have invented a new type in this PR, I understand it should be properly documented there.
(I already published this comment, but it probably get lost :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly, there is a section about multimeasures in such documentation https://github.com/telefonicaid/iotagent-node-lib/blob/master/test/functional/README.md#multimeasures, but the relation with the test type
is not mentioned there... (probably it should)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multimeasures were already supported for measures reception, but not for the expectations.
New changes were included since this PR changed the way of multimeasures are sent. In this case, the expectation changes. Thus, a new parameter is needed
Co-authored-by: Fermín Galán Márquez <fgalan@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
related to fix telefonicaid/iotagent-json#825