Enhance catalog assertions in ICD tests - #92
Draft
markccchiang wants to merge 4 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses part of issue #3. The three catalog tests drive filtering, sorting, and progressive loading against a live backend, but none of them looked at the rows that came back. This branch asserts the returned data, fixes the assertions that could not fail, and moves the shared helpers into
MyClient.ts.Per-test summary
CATALOG_FITS_VOTThe filter request streams 918777 rows as 10 messages. The test kept
slice(-1)[0]and printed the rest to the console, so the chunk count, the per-chunk sizes, and the row offsets were unchecked.The whole sequence is now asserted: every message reports the requested catalog and the full filtered table, the chunks tile the subset without a gap or an overlap, every column carries one value per row of its
subset_data_size, and the progress rises and reaches 1 only in the last message.Those are the fields the frontend depends on;
AppStore.ts:2381routes a chunk to a catalog store byfileId, andCatalogProfileStore.ts:98-100derives the row offset fromsubsetEndIndex - subsetDataSize. With two catalogs open at once, a wrongfileIdwrites one table's rows into the other's widget.Also added:
preview_dataholds 50 rows of all 62 columns, and the headers describe every column exactly once with noUnsupportedType. The staledescriptionfixture, which the backend does not emit and which nothing asserted, is replaced by the composed string it does emit.CATALOG_GENERALThis is the test that covers filtering and sorting, and it verified neither. Four steps issue a sort, a numeric filter, a string filter, and both plus a sort, then assert row counts. The step named "Sorting" checked nothing about order.
The filter and sort name a column while the response keys its columns by index, so the test now ties the two together through the headers and reads the values:
RA_dvalues are in ascending order.RA_dis >= 160, and the count equals the number of rows of the unfiltered table which meet that condition.OTYPE_Scontains the substring "Star", and the number of returned rows equals the number of rows of the unfiltered table that do.CATALOG_LARGEPart 2 loads three windows of 50 rows at start indices 50, 100, and 150 and asserts only the sizes and indices derived from those start indices. Returning the same 50 rows three times would have passed.
Each window is now compared against the rows the whole-table load of part 1 returned at the same position in the table. That is the actual pagination contract: the frontend fills one allocated array from either path and has to get identical data. The three windows are also asserted to differ from each other; a window ends at
subset_start_index + subset_data_size, andfilter_data_sizestays at the full table size whichever window is requested.Rows are compared as raw payload rather than decoded values, so the comparison covers every column type.
ProtobufProcessingcannot be used because its 64-bit branches need the undefinedCARTAComputeWASM global.Checklist
For the pull request:
(or no documentation changes are needed)