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 upd twin #104

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public async Task<string> GetTwinAsync(CancellationToken cancellationToken = def

public async Task<int> UpdateTwinAsync(object payload, CancellationToken cancellationToken = default)
{
var twin = await updateTwinBinder.InvokeAsync(Connection.Options.ClientId, JsonSerializer.Serialize(payload), cancellationToken);
var twin = await updateTwinBinder.InvokeAsync(Connection.Options.ClientId, payload, cancellationToken);
return twin;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public GenericCommandClient(IMqttClient client)
{
_tcs!.SetException(new ApplicationException("Invalid correlation data"));
}

// TODO: Review UserProps retrieval (3 and 5)
//var up = m.ApplicationMessage.UserProperties.FirstOrDefault(p => p.Name.Equals("status"));
//int status = up != null ? int.Parse(up.Value) : 500;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,16 @@ public async Task ModuleCert()
await client.DisconnectAsync();
}

[Fact(Skip ="Required edgeHub-local")]
//Fact(Skip ="Required edgeHub-local")]
[Fact]
public async Task ModuleSasUsingEdgeHub()
{
var cs = new ConnectionSettings()
{
HostName = "rido-edges.azure-devices.net",
DeviceId = "riduntu22",
ModuleId = "MyFilterModule",
SharedAccessKey = "xidAoWNigrri7dAV/NynNFvOCTTgyTjlUIGoHI6wxyk=",
ModuleId = "ModuleOne",
SharedAccessKey = "c+ZZs5grZizn/RHj7vWjTvboY+wQ5sWu9PFfchJVybk=",
GatewayHostName = "localhost"
};
var connAck = await client!.ConnectAsync(new MqttClientOptionsBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ private static ConnectionSettings TestCS(string clientId)
TcpPort = 1883,
UserName = "user",
Password = "password",
ClientId = clientId
ClientId = clientId,
MqttVersion = 5
};
}

Expand Down