Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
dantengsky committed Oct 19, 2022
1 parent e11a5f5 commit d89a06d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ async fn test_fuse_snapshot_table_read() -> Result<()> {
}

{
// previously, inserted 5 blocks, 3 rows per block
// another 5 blocks, 15 rows here
append_sample_data(5, &fixture).await?;
let expected = vec![
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ impl<'a> FuseSnapshot<'a> {
pub async fn get_snapshots(self, limit: Option<usize>) -> Result<DataBlock> {
let meta_location_generator = self.table.meta_location_generator.clone();
let snapshot_location = self.table.snapshot_loc().await?;
let snapshot = self.table.read_table_snapshot(self.ctx.clone()).await?;
if let Some(snapshot_location) = snapshot_location {
let snapshot_version = self.table.snapshot_format_version().await?;
let snapshots_io = SnapshotsIO::create(
Expand All @@ -45,7 +46,12 @@ impl<'a> FuseSnapshot<'a> {
snapshot_version,
);
let (snapshots, _) = snapshots_io
.read_snapshot_lites(snapshot_location, limit, false, None)
.read_snapshot_lites(
snapshot_location,
limit,
false,
snapshot.and_then(|s| s.timestamp),
)
.await?;
return self.to_block(&meta_location_generator, &snapshots, snapshot_version);
}
Expand Down
3 changes: 1 addition & 2 deletions tests/logictest/http_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ def query_with_session(self, statement):
while response['next_uri'] is not None:
resp = self.next_page(response['next_uri'])
response = json.loads(resp.content)
log.debug(
f"Sql in progress, fetch next_uri content: {response}")
log.debug(f"Sql in progress, fetch next_uri content: {response}")
check_error(response)
session = response['session']
if session:
Expand Down
1 change: 1 addition & 0 deletions tests/logictest/http_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import http_connector
from mysql.connector.errors import Error


class TestHttp(logictest.SuiteRunner, ABC):

def __init__(self, kind, args):
Expand Down

0 comments on commit d89a06d

Please sign in to comment.