Skip to content

Commit 0a36768

Browse files
Extend wait time in exporter tests + revert ops dependency to <2.10.0
1 parent 0cf8b71 commit 0a36768

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

poetry.lock

Lines changed: 4 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@ authors = []
1010

1111
[tool.poetry.dependencies]
1212
python = "^3.8.1" # ^3.8.1 required by flake8
13-
ops = "^2.12.0"
13+
ops = "<2.10.0"
1414
tenacity = "^8.2.3"
1515
poetry-core = "^1.7.0"
1616
jinja2 = "^3.1.2"
1717
requests = "^2.31.0"
1818

1919
[tool.poetry.group.charm-libs.dependencies]
2020
# data_platform_libs/v0/data_interfaces.py
21-
ops = ">=2.12.0"
22-
# tls_certificates_interface/v1/tls_certificates.py
21+
ops = "<2.10.0"
22+
# tls_certificates_interface/v2/tls_certificates.py
23+
# tls_certificates lib v2 uses a feature only available in cryptography >=42.0.5
2324
cryptography = ">=42.0.5"
2425
jsonschema = "*"
2526
# grafana_agent/v0/cos_agent.py
@@ -52,7 +53,7 @@ pytest = "^7.4.0"
5253
pytest-xdist = "^3.3.1"
5354
pytest-cov = "^4.1.0"
5455
ops-scenario = "^5.4.1"
55-
ops = ">=2.12.0"
56+
ops = "<2.10.0"
5657
pytest-mock = "^3.11.1"
5758

5859
[tool.poetry.group.integration.dependencies]
@@ -64,7 +65,7 @@ pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workf
6465
juju = "3.2.0.1"
6566
mysql-connector-python = "~8.0.33"
6667
tenacity = "^8.2.2"
67-
ops = ">=2.12.0"
68+
ops = "<2.10.0"
6869
pytest-mock = "^3.11.1"
6970

7071

tests/integration/test_exporter.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ async def test_exporter_endpoint(ops_test: OpsTest, mysql_router_charm_series: s
135135
f"{GRAFANA_AGENT_APP_NAME}:cos-agent", f"{MYSQL_ROUTER_APP_NAME}:cos-agent"
136136
)
137137

138-
time.sleep(30)
138+
time.sleep(60)
139139

140140
jmx_resp = http.request("GET", f"http://{unit_address}:49152/metrics")
141141
assert jmx_resp.status == 200, "❌ cannot connect to metrics endpoint with relation with cos"
@@ -148,7 +148,7 @@ async def test_exporter_endpoint(ops_test: OpsTest, mysql_router_charm_series: s
148148
f"{GRAFANA_AGENT_APP_NAME}:cos-agent", f"{MYSQL_ROUTER_APP_NAME}:cos-agent"
149149
)
150150

151-
time.sleep(30)
151+
time.sleep(60)
152152

153153
try:
154154
http.request("GET", f"http://{unit_address}:49152/metrics")
@@ -184,7 +184,7 @@ async def test_exporter_endpoint_with_tls(ops_test: OpsTest) -> None:
184184
f"{MYSQL_ROUTER_APP_NAME}:certificates", f"{TLS_APP_NAME}:certificates"
185185
)
186186

187-
time.sleep(30)
187+
time.sleep(60)
188188

189189
mysql_test_app = ops_test.model.applications[APPLICATION_APP_NAME]
190190
unit_address = await mysql_test_app.units[0].get_public_address()
@@ -203,7 +203,7 @@ async def test_exporter_endpoint_with_tls(ops_test: OpsTest) -> None:
203203
f"{GRAFANA_AGENT_APP_NAME}:cos-agent", f"{MYSQL_ROUTER_APP_NAME}:cos-agent"
204204
)
205205

206-
time.sleep(30)
206+
time.sleep(60)
207207

208208
jmx_resp = http.request("GET", f"http://{unit_address}:49152/metrics")
209209
assert jmx_resp.status == 200, "❌ cannot connect to metrics endpoint with relation with cos"
@@ -216,7 +216,7 @@ async def test_exporter_endpoint_with_tls(ops_test: OpsTest) -> None:
216216
f"{GRAFANA_AGENT_APP_NAME}:cos-agent", f"{MYSQL_ROUTER_APP_NAME}:cos-agent"
217217
)
218218

219-
time.sleep(30)
219+
time.sleep(60)
220220

221221
try:
222222
http.request("GET", f"http://{unit_address}:49152/metrics")

0 commit comments

Comments
 (0)