Fixed FromEdgeSyncResponse in ProtoUtils
This commit is contained in:
		
							parent
							
								
									8cc1bccc5b
								
							
						
					
					
						commit
						61b7bfd849
					
				@ -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, ""));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -159,6 +159,7 @@ public class ProtoUtils {
 | 
			
		||||
                .setEdgeIdMSB(response.getEdgeId().getId().getMostSignificantBits())
 | 
			
		||||
                .setEdgeIdLSB(response.getEdgeId().getId().getLeastSignificantBits())
 | 
			
		||||
                .setSuccess(response.isSuccess())
 | 
			
		||||
                .setError(response.getError())
 | 
			
		||||
                .build();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user