Fixed FromEdgeSyncResponse in ProtoUtils

This commit is contained in:
Volodymyr Babak 2024-08-02 14:41:36 +03:00
parent 8cc1bccc5b
commit 61b7bfd849
3 changed files with 3 additions and 2 deletions

View File

@ -292,7 +292,7 @@ public class EdgeGrpcService extends EdgeRpcServiceGrpc.EdgeRpcServiceImplBase i
session.startSyncProcess(true);
success = true;
}
clusterService.pushEdgeSyncResponseToCore(new FromEdgeSyncResponse(requestId, tenantId, edgeId, success, null));
clusterService.pushEdgeSyncResponseToCore(new FromEdgeSyncResponse(requestId, tenantId, edgeId, success, ""));
}
}

View File

@ -159,6 +159,7 @@ public class ProtoUtils {
.setEdgeIdMSB(response.getEdgeId().getId().getMostSignificantBits())
.setEdgeIdLSB(response.getEdgeId().getId().getLeastSignificantBits())
.setSuccess(response.isSuccess())
.setError(response.getError())
.build();
}

View File

@ -124,7 +124,7 @@ class ProtoUtilsTest {
@Test
void protoFromEdgeSyncResponseSerialization() {
FromEdgeSyncResponse msg = new FromEdgeSyncResponse(id, tenantId, edgeId, true, null);
FromEdgeSyncResponse msg = new FromEdgeSyncResponse(id, tenantId, edgeId, true, "Error Msg");
assertThat(ProtoUtils.fromProto(ProtoUtils.toProto(msg))).as("deserialized").isEqualTo(msg);
}