delta-io / delta

An open-source storage framework that enables building a Lakehouse architecture with compute engines including Spark, PrestoDB, Flink, Trino, and Hive and APIs
https://delta.io
Apache License 2.0
6.98k stars 1.6k forks source link

[Spark] Improve GetCommits validation in CommitOwnerClient tests #3096

Closed LukasRupprecht closed 2 weeks ago

LukasRupprecht commented 2 weeks ago

Which Delta project/connector is this regarding?

Description

This PR makes a small improvement to the recently introduced CommitOwnerClientImplSuiteBase (a base trait that can be extended by CommitOwnerClient implementation tests). The change improves how the result of a getCommits call is validated. Instead of passing in a list of versions to validateGetCommitsResult, it now accepts the entire GetCommitsResponse. This allows to do more filtering on the result and also compare the latestTableVersion that is returned as part of the response (which is now implemented in the InMemoryCommitOwnerSuite).

How was this patch tested?

Ensure that InMemoryCommitOwnerSuite still passes

Does this PR introduce any user-facing changes?

No