Skip to content
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

fix(iot-service, deps, e2e): Fix issue where ConnectionState was never propagated up through DeviceTwinDevice object #525

Merged
merged 1 commit into from
May 30, 2019

Conversation

timtay-microsoft
Copy link
Member

service was sending uppercase "Disconnected" and "Connected" when the SDK was expected lowercase "disconnected" and "connected"

The SDK was missing logic to propagate up this Json field to the DeviceTwinDevice object, too.

@timtay-microsoft timtay-microsoft force-pushed the connectionState branch 2 times, most recently from 43c8f53 to 537a4c3 Compare May 28, 2019 17:32
@@ -383,6 +383,16 @@ public static TwinState createFromPropertiesJson(String json)
return new TwinState(null, result.getDesired(), result.getReported());
}

public String getConnectionState()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add comments for javadoc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure thing

@@ -10,9 +10,9 @@
*/
public enum TwinConnectionState
{
@SerializedName("disconnected")
@SerializedName("Disconnected")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we make this case-insensitive?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't, but I can make it catch "disconnected" and "Disconnected"

return this.connectionState;
}

protected void setConnectionState(String connectionState)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add comments

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure thing

…r propagated up through DeviceTwinDevice object

service was sending uppercase "Disconnected" and "Connected" when the SDK was expected lowercase "disconnected" and "connected"
@Azure Azure deleted a comment from azure-pipelines bot May 30, 2019
@Azure Azure deleted a comment from azure-pipelines bot May 30, 2019
@Azure Azure deleted a comment from azure-pipelines bot May 30, 2019
@Azure Azure deleted a comment from azure-pipelines bot May 30, 2019
@Azure Azure deleted a comment from azure-pipelines bot May 30, 2019
@Azure Azure deleted a comment from azure-pipelines bot May 30, 2019
@Azure Azure deleted a comment from azure-pipelines bot May 30, 2019
@Azure Azure deleted a comment from azure-pipelines bot May 30, 2019
@Azure Azure deleted a comment from azure-pipelines bot May 30, 2019
@Azure Azure deleted a comment from azure-pipelines bot May 30, 2019
@Azure Azure deleted a comment from azure-pipelines bot May 30, 2019
@Azure Azure deleted a comment from azure-pipelines bot May 30, 2019
@Azure Azure deleted a comment from azure-pipelines bot May 30, 2019
@Azure Azure deleted a comment from azure-pipelines bot May 30, 2019
Copy link
Contributor

@jasmineymlo jasmineymlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@timtay-microsoft timtay-microsoft merged commit 7032c7f into master May 30, 2019
@timtay-microsoft timtay-microsoft deleted the connectionState branch May 30, 2019 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants