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
Read Response with timestamped SenML #1610
base: master
Are you sure you want to change the base?
Read Response with timestamped SenML #1610
Conversation
fdf802c
to
1ea4b47
Compare
I will try to look at this tomorrow. |
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.
My first quick review.
I didn't checkout / test the code yet.
Do you want to handle timestamped value for ObserveResponse
too ?
(I mean for observe response, not notification (notification as already timestamp value)
...egration-tests/src/test/java/org/eclipse/leshan/integration/tests/lockstep/LockStepTest.java
Outdated
Show resolved
Hide resolved
...egration-tests/src/test/java/org/eclipse/leshan/integration/tests/lockstep/LockStepTest.java
Outdated
Show resolved
Hide resolved
...egration-tests/src/test/java/org/eclipse/leshan/integration/tests/lockstep/LockStepTest.java
Outdated
Show resolved
Hide resolved
@Override | ||
public ReadResponse call() throws Exception { | ||
// send a request with 3 seconds timeout | ||
return server.send(registration, new ReadRequest(ContentFormat.SENML_JSON, 1), 2000); |
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.
2 seconds timeout is maybe too high ? 1 is enough
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.
We should leave a 2 seconds timeout, with 1 s we can't get a response
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.
1s should be largely enough to get a response using localhost in tests.
So I read the test again and I see that the comment says :
- 3 seconds
- and the timeout value parameter value is
1
But the javadoc says :
* @param timeoutInMs The global timeout to wait in milliseconds
So it should be 3 seconds and 3000 or 1 seconds and 1000
client.sendResponse(Type.ACK, ResponseCode.CONTENT, ContentFormat.SENML_JSON).loadMID("MID").loadToken("TKN") | ||
.payload(payload).go(); | ||
|
||
ReadResponse response = future.get(2000, TimeUnit.MILLISECONDS); |
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.
2 seconds timeout is maybe too high ? 1 is enough
(why not just using 1 and TimeUnit.SECONDS)
...rc/main/java/org/eclipse/leshan/server/californium/endpoint/ServerCoapMessageTranslator.java
Outdated
Show resolved
Hide resolved
...ver-cf/src/main/java/org/eclipse/leshan/server/californium/request/LwM2mResponseBuilder.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/eclipse/leshan/transport/javacoap/server/request/LwM2mResponseBuilder.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/eclipse/leshan/transport/javacoap/server/request/LwM2mResponseBuilder.java
Outdated
Show resolved
Hide resolved
1ea4b47
to
77e086c
Compare
77e086c
to
cffdbff
Compare
cffdbff
to
778eecd
Compare
I rebase the code on You could review it if wanted. (I advice to review commit by commit) We still need to decide :
I didn't have time to test about reducing timeout value but I pretty sure that 3 seconds is not needed |
Implementation of read response with timestamped SenML
This aims to implement : #1553