Skip to content

Commit ad10c43

Browse files
committed
HPCC-35694 Address review comments
- Fix ecm version to 1.69 as structure is shared with another service already on 1.68. - Update all services using shared structure to version 1.69. - Correct FileSize checks in Files.tsx - Update unittests to return all DFU fields needed to pass new tests. Signed-off-by: Terrence Asselin <terrence.asselin+copilot@lexisnexisrisk.com>
1 parent 4814af3 commit ad10c43

5 files changed

Lines changed: 12 additions & 7 deletions

File tree

esp/scm/ws_dfu.ecm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,8 @@ ESPresponse [version("1.68"), exceptions_inline, nil_remove] DFUFileRenameRespon
10371037
// ===========================================================================
10381038
ESPservice [
10391039
auth_feature("DEFERRED"),
1040-
version("1.68"),
1041-
default_client_version("1.68"),
1040+
version("1.69"),
1041+
default_client_version("1.69"),
10421042
noforms,
10431043
exceptions_inline("./smc_xslt/exceptions.xslt")] WsDfu
10441044
{

esp/scm/ws_dfuXref.ecm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ ESPresponse [exceptions_inline] DFUXRefUnusedFilesResponse
228228
};
229229

230230
// ===========================================================================
231-
ESPservice [version("1.04"), default_client_version("1.04"), auth_feature("DEFERRED"), exceptions_inline("./smc_xslt/exceptions.xslt")] WsDFUXRef
231+
ESPservice [version("1.69"), default_client_version("1.69"), auth_feature("DEFERRED"), exceptions_inline("./smc_xslt/exceptions.xslt")] WsDFUXRef
232232
{
233233
///ESPmethod [resp_xsl_default("./smc_xslt/xref_main.xslt")] DFUXRefList(DFUXRefListRequest, DFUXRefListResponse);
234234
ESPmethod [resp_xsl_default("/esp/xslt/xref_main.xslt")] DFUXRefList(DFUXRefListRequest, DFUXRefListResponse);

esp/scm/ws_dfu_common.ecm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ ESPStruct DFULogicalFile
5959
[min_ver("1.63"), nil_remove] int64 MaxSkew;
6060
[min_ver("1.63"), nil_remove] int64 MinSkewPart;
6161
[min_ver("1.63"), nil_remove] int64 MaxSkewPart;
62-
[min_ver("1.68")] int64 FileSize;
62+
[min_ver("1.69")] int64 FileSize;
6363
};

esp/src/src-react/components/Files.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,13 @@ export const Files: React.FunctionComponent<FilesProps> = ({
212212
FileSize: {
213213
label: nlsHPCC.FileSize,
214214
formatter: (value, row) => {
215-
if (row.FileSize) {
215+
if (row.FileSize !== undefined) {
216216
return Utility.convertedSize(row.FileSize);
217217
}
218218
return Utility.convertedSize(row.IsCompressed ? row.CompressedFileSize : row.IntSize);
219219
},
220220
csvFormatter: (value, row) => {
221-
if (row.FileSize) {
221+
if (row.FileSize !== undefined) {
222222
return row.FileSize;
223223
}
224224
return row.IsCompressed ? row.CompressedFileSize : row.IntSize;

testing/unittests/dalitests.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2838,7 +2838,12 @@ class DaliDFSIteratorTests : public CppUnit::TestFixture
28382838
filterBuf.append(DFUQFTspecial).append(DFUQFilterSeparator).append(DFUQSFFileType).append(DFUQFilterSeparator).append(DFUQFFTnonsuperfileonly).append(DFUQFilterSeparator);
28392839
filterBuf.append(DFUQFTspecial).append(DFUQFilterSeparator).append(DFUQSFFileNameWithPrefix).append(DFUQFilterSeparator).append(wildName).append(DFUQFilterSeparator);
28402840

2841-
std::vector<DFUQResultField> fields = {DFUQResultField::size, DFUQResultField::cost, DFUQResultField::term};
2841+
// Must include all fields needed for sorting and inspection in loop below.
2842+
//
2843+
// rowCompressed and blockCompressed required for getLogicalFilesSorted to successfully run the isCompressed()
2844+
// test used when determining which size value to populate DFUQResultField::size with (compressed vs uncompressed).
2845+
// Alternately, could use DFUQResultField::includeAll to return all fields if the test expands in scope.
2846+
std::vector<DFUQResultField> fields = {DFUQResultField::size, DFUQResultField::cost, DFUQResultField::rowCompressed, DFUQResultField::blockCompressed, DFUQResultField::term};
28422847

28432848
DFUQResultField sortOrder[2] = {DFUQResultField::job|DFUQResultField::reverse, DFUQResultField::term};
28442849
__int64 hint;

0 commit comments

Comments
 (0)