Skip to content

Commit e95f668

Browse files
author
Ilyas Gasanov
committed
refresh spark
1 parent c755d76 commit e95f668

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_integration/test_run_transfer/test_hive.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pytest_asyncio
55
from httpx import AsyncClient
66
from onetl.db import DBReader
7-
from pyspark.sql import DataFrame
7+
from pyspark.sql import DataFrame, SparkSession
88
from pytest_lazy_fixtures import lf
99
from sqlalchemy.ext.asyncio import AsyncSession
1010

@@ -169,6 +169,7 @@ async def test_run_transfer_postgres_to_hive_mixed_naming_with_full_strategy(
169169
],
170170
)
171171
async def test_run_transfer_postgres_to_hive_with_incremental_strategy(
172+
spark: SparkSession,
172173
client: AsyncClient,
173174
group_owner: MockUser,
174175
prepare_postgres,
@@ -197,6 +198,7 @@ async def test_run_transfer_postgres_to_hive_with_incremental_strategy(
197198
fill_with_data(second_transfer_df)
198199
await run_transfer_and_verify(client, group_owner, postgres_to_hive.id)
199200

201+
spark.catalog.refreshTable("default.target_table")
200202
df_with_increment = reader.run()
201203
df_with_increment, init_df = prepare_dataframes_for_comparison(df_with_increment, init_df)
202204
assert df_with_increment.sort("ID").collect() == init_df.sort("ID").collect()

0 commit comments

Comments
 (0)