robertmu opened a new pull request, #19:
URL: https://github.com/apache/cloudberry-gpbackup/pull/19

   The integration test for `GetColumnDefinitions` was failing on Cloudberry 
because it returned column encoding options in a different order than Greenplum 
7. For example, for a default encoding, GPDB7 returned 
"...,blocksize=32768,compresslevel=0" while Cloudberry returned 
"...,compresslevel=0,blocksize=32768".
   
   The test was performing a strict string comparison on the `Encoding` field, 
making it brittle and dependent on ordering.
   
   This commit fixes the test by making the comparison order-insensitive. 
Instead of comparing the `Encoding` string directly, the test now:
   1. Splits the expected and actual encoding strings into slices of key-value 
pairs.
   2. Uses `gomega.ConsistOf` to assert that both slices contain the same 
elements, regardless of their order.
   3. Continues to use `structmatcher` for all other fields in the 
`ColumnDefinition` struct.
   
   This approach makes the test more robust and correctly validates the 
encoding options across different database environments without being affected 
by ordering differences.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org
For additional commands, e-mail: commits-h...@cloudberry.apache.org

Reply via email to