Skip to content

Commit

Permalink
set parallel workers to 3
Browse files Browse the repository at this point in the history
  • Loading branch information
piket committed Nov 3, 2023
1 parent 607dd5b commit 429f71c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
- name: Install dependencies
run: make install-python-ci-dependencies
- name: Test Python
run: pytest -n 1 --cov=./ --cov-report=xml --color=yes sdk/python/tests -o log_cli=true
run: pytest -n 3 --cov=./ --cov-report=xml --color=yes sdk/python/tests -o log_cli=true

unit-test-go:
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@


class ElasticsearchOnlineStoreCreator(OnlineStoreCreator):
def __init__(self, project_name: str, es_port: int):
def __init__(self, project_name: str):
super().__init__(project_name)
self.es_port = 9200
self.elasticsearch_container = ElasticSearchContainer(
image="docker.elastic.co/elasticsearch/elasticsearch:8.8.2",
port_to_expose=es_port,
port_to_expose=self.es_port,
)

def create_online_store(self):
# Start the container
self.elasticsearch_container.start()
elasticsearch_host = self.elasticsearch_container.get_container_host_ip()
elasticsearch_http_port = self.elasticsearch_container.get_exposed_port(9200)
elasticsearch_http_port = self.elasticsearch_container.get_exposed_port(self.es_port)
return {
"host": elasticsearch_host,
"port": elasticsearch_http_port,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def repo_config(embedded_elasticsearch):

@pytest.fixture(scope="session")
def embedded_elasticsearch():
online_store_creator = ElasticsearchOnlineStoreCreator(PROJECT, 9200)
online_store_creator = ElasticsearchOnlineStoreCreator(PROJECT)
online_store_config = online_store_creator.create_online_store()

yield online_store_config
Expand Down

0 comments on commit 429f71c

Please sign in to comment.