Skip to content

Commit

Permalink
fix formatting for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
piket committed Oct 30, 2023
1 parent 0317133 commit f28bf74
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sdk/python/tests/expediagroup/test_elasticsearch_online_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ def test_elasticsearch_update_add_index(self, repo_config, caplog, index_params)
"type": index_params["index_type"].lower(),
**index_params["index_params"],
}

with ElasticsearchConnectionManager(repo_config.online_store) as es:
created_index = es.indices.get(index=self.index_to_write)
assert created_index.body[self.index_to_write]["mappings"] == mapping
Expand Down Expand Up @@ -208,6 +209,7 @@ def test_elasticsearch_update_add_existing_index(self, repo_config, caplog):
entities_to_keep=[],
partial=False,
)

with ElasticsearchConnectionManager(repo_config.online_store) as es:
assert es.indices.exists(index=self.index_to_write).body is True

Expand All @@ -229,6 +231,7 @@ def test_elasticsearch_update_delete_index(self, repo_config, caplog):
),
]
self._create_index_in_es(self.index_to_delete, repo_config)

with ElasticsearchConnectionManager(repo_config.online_store) as es:
assert es.indices.exists(index=self.index_to_delete).body is True

Expand All @@ -247,6 +250,7 @@ def test_elasticsearch_update_delete_index(self, repo_config, caplog):
entities_to_keep=[],
partial=False,
)

with ElasticsearchConnectionManager(repo_config.online_store) as es:
assert es.indices.exists(index=self.index_to_delete).body is False

Expand All @@ -267,6 +271,7 @@ def test_elasticsearch_update_delete_unavailable_index(self, repo_config, caplog
dtype=String,
),
]

with ElasticsearchConnectionManager(repo_config.online_store) as es:
assert es.indices.exists(index=self.index_to_delete).body is False

Expand All @@ -285,6 +290,7 @@ def test_elasticsearch_update_delete_unavailable_index(self, repo_config, caplog
entities_to_keep=[],
partial=False,
)

with ElasticsearchConnectionManager(repo_config.online_store) as es:
assert es.indices.exists(index=self.index_to_delete).body is False

Expand Down Expand Up @@ -333,8 +339,10 @@ def test_elasticsearch_online_read(self, repo_config, caplog):
data=data,
progress=None,
)

with ElasticsearchConnectionManager(repo_config.online_store) as es:
es.indices.refresh(index=self.index_to_read)

result = store.online_read(
config=repo_config.online_store,
table=feature_view,
Expand Down Expand Up @@ -373,8 +381,10 @@ def test_elasticsearch_online_read_with_requested_features(
data=data,
progress=None,
)

with ElasticsearchConnectionManager(repo_config.online_store) as es:
es.indices.refresh(index=self.index_to_read)

result = store.online_read(
config=repo_config.online_store,
table=feature_view,
Expand Down

0 comments on commit f28bf74

Please sign in to comment.