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

[PDI-20262] - Uploaded PDI Job/Transformation in PDI and save in Repository has file size of 0 on the Properties screen #5804

Merged
merged 1 commit into from
Dec 10, 2024
Merged
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 @@ -23,6 +23,7 @@ public NodeRepositoryFileDataDto() {
}

private DataNodeDto node;
private long dataSize = 0;

public DataNodeDto getNode() {
return node;
Expand All @@ -32,6 +33,14 @@ public void setNode( DataNodeDto node ) {
this.node = node;
}

public long getDataSize() {
return dataSize;
}

public void setDataSize( long dataSize ) {
this.dataSize = dataSize;
}

@SuppressWarnings( "nls" )
@Override
public String toString() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,22 @@
*/
public class NodeRepositoryFileDataDtoTest {
@Test
public void testDto() {
public void testDtoNode() {

NodeRepositoryFileDataDto dto = new NodeRepositoryFileDataDto();
DataNodeDto nodeMock = new DataNodeDto();
dto.setNode( nodeMock );
assertEquals( dto.getNode(), nodeMock );
assertEquals( nodeMock, dto.getNode() );

}

@Test
public void testDtoDataSize() {

NodeRepositoryFileDataDto dto = new NodeRepositoryFileDataDto();
int dataSize = 100;
dto.setDataSize( dataSize );
assertEquals( dataSize, dto.getDataSize() );

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public NodeRepositoryFileDataDto marshal( final NodeRepositoryFileData v ) {
NodeRepositoryFileDataDto d = new NodeRepositoryFileDataDto();
DataNodeDto node = new DataNodeDto();
d.setNode( node );
d.setDataSize( v.getDataSize() );
toDataNodeDto( node, v.getNode() );
return d;
}
Expand Down Expand Up @@ -73,8 +74,7 @@ protected void toDataNodeDto( final DataNodeDto nodeDto, final DataNode node ) {
@Override
public NodeRepositoryFileData unmarshal( final NodeRepositoryFileDataDto v ) {
DataNode node = toDataNode( v.getNode() );
NodeRepositoryFileData data = new NodeRepositoryFileData( node );
return data;
return new NodeRepositoryFileData( node, v.getDataSize() );
}

protected DataNode toDataNode( final DataNodeDto nodeDto ) {
Expand Down