Skip to content

Tests run out of order in integration tox enviornment #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
carlcsaposs-canonical opened this issue Nov 28, 2022 · 1 comment · Fixed by #118
Closed

Tests run out of order in integration tox enviornment #117

carlcsaposs-canonical opened this issue Nov 28, 2022 · 1 comment · Fixed by #118

Comments

@carlcsaposs-canonical
Copy link
Contributor

carlcsaposs-canonical commented Nov 28, 2022

Bug Description

tox -e integration runs tests out of order & causes tests in the same Python module to run in different Juju models

To Reproduce

  1. tox -e integration

Environment

MicroK8s v1.25.4 revision 4221
juju agent version: 2.9.29
juju cli version: 2.9.37-ubuntu-amd64
tox version: 3.21.4 imported from /usr/lib/python3/dist-packages/tox/__init__.py

Relevant log output (trimmed)

============================= test session starts ==============================
[snipped]                                                           

tests/integration/test_charm.py::test_build_and_deploy 
-------------------------------- live log setup --------------------------------
INFO     pytest_operator.plugin:plugin.py:625 Adding model micro:test-charm-xptw on cloud microk8s
-------------------------------- live log call ---------------------------------
INFO     pytest_operator.plugin:plugin.py:504 Using tmp_path: /home/ubuntu/repos/mysql-k8s-operator/.tox/integration/tmp/pytest/test-charm-xptw0
INFO     pytest_operator.plugin:plugin.py:948 Building charm mysql-k8s
INFO     pytest_operator.plugin:plugin.py:953 Built charm mysql-k8s in 1081.01s
INFO     juju.model:model.py:1924 Deploying local:focal/mysql-k8s-0
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [allocating] waiting: installing agent
  mysql-k8s/1 [allocating] waiting: installing agent
  mysql-k8s/2 [allocating] waiting: installing agent
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [executing] unknown: 
  mysql-k8s/1 [executing] unknown: 
  mysql-k8s/2 [executing] unknown: 
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [idle] waiting: Waiting for instance to join the cluster
  mysql-k8s/1 [idle] waiting: Waiting for instance to join the cluster
  mysql-k8s/2 [executing] active: 
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/1 [idle] waiting: Waiting for instance to join the cluster
  mysql-k8s/2 [executing] active: 
PASSED
------------------------------ live log teardown -------------------------------
INFO     pytest_operator.plugin:plugin.py:768 Model status:

Model            Controller  Cloud/Region        Version  SLA          Timestamp
test-charm-xptw  micro       microk8s/localhost  2.9.29   unsupported  16:05:29Z

App        Version                  Status  Scale  Charm      Channel  Rev  Address         Exposed  Message
mysql-k8s  8.0.31-0ubuntu0.22.04.1  active      3  mysql-k8s             0  10.152.183.196  no       

Unit          Workload  Agent  Address       Ports  Message
mysql-k8s/0   active    idle   10.1.198.205         
mysql-k8s/1   active    idle   10.1.198.204         
mysql-k8s/2*  active    idle   10.1.198.206         


INFO     pytest_operator.plugin:plugin.py:774 Juju error logs:


INFO     pytest_operator.plugin:plugin.py:861 Resetting model test-charm-xptw...
INFO     pytest_operator.plugin:plugin.py:850    Destroying applications mysql-k8s
INFO     pytest_operator.plugin:plugin.py:866 Not waiting on reset to complete.
INFO     pytest_operator.plugin:plugin.py:839 Forgetting main...

tests/integration/test_tls.py::test_build_and_deploy 
-------------------------------- live log setup --------------------------------
INFO     pytest_operator.plugin:plugin.py:625 Adding model micro:test-tls-ro54 on cloud microk8s
-------------------------------- live log call ---------------------------------
[snipped]
PASSED
------------------------------ live log teardown -------------------------------
[snipped]

tests/integration/high_availability/test_replication.py::test_build_and_deploy 
-------------------------------- live log setup --------------------------------
INFO     pytest_operator.plugin:plugin.py:625 Adding model micro:test-replication-pujw on cloud microk8s
-------------------------------- live log call ---------------------------------
[snipped]
PASSED
------------------------------ live log teardown -------------------------------
[snipped]

tests/integration/high_availability/test_self_healing.py::test_build_and_deploy 
-------------------------------- live log setup --------------------------------
INFO     pytest_operator.plugin:plugin.py:625 Adding model micro:test-self-healing-d0xa on cloud microk8s
-------------------------------- live log call ---------------------------------
[snipped]
PASSED
------------------------------ live log teardown -------------------------------
[snipped]

tests/integration/relations/test_database.py::test_build_and_deploy 
-------------------------------- live log setup --------------------------------
INFO     pytest_operator.plugin:plugin.py:625 Adding model micro:test-database-kga8 on cloud microk8s
-------------------------------- live log call ---------------------------------
[snipped]
PASSED
------------------------------ live log teardown -------------------------------
[snipped]
PASSED
------------------------------ live log teardown -------------------------------
[snipped]

tests/integration/test_charm.py::test_consistent_data_replication_across_cluster 
-------------------------------- live log setup --------------------------------
INFO     pytest_operator.plugin:plugin.py:625 Adding model micro:test-charm-vjwb on cloud microk8s
FAILED
------------------------------ live log teardown -------------------------------
INFO     pytest_operator.plugin:plugin.py:768 Model status:

Model            Controller  Cloud/Region        Version  SLA          Timestamp
test-charm-vjwb  micro       microk8s/localhost  2.9.29   unsupported  16:30:13Z


INFO     pytest_operator.plugin:plugin.py:774 Juju error logs:


INFO     pytest_operator.plugin:plugin.py:793 juju-crashdump command was not found.
INFO     pytest_operator.plugin:plugin.py:861 Resetting model test-charm-vjwb...
INFO     pytest_operator.plugin:plugin.py:866 Not waiting on reset to complete.
INFO     pytest_operator.plugin:plugin.py:839 Forgetting main...

Additional context

Note that test_charm.py::test_build_and_deploy runs on Juju model test-charm-xptw and test_charm.py::test_consistent_data_replication_across_cluster runs on test-charm-vjwb

Untrimmed log output:
integration create: /home/ubuntu/repos/mysql-k8s-operator/.tox/integration
integration installdeps: juju==2.9.11, lightkube, mysql-connector-python, pytest, pytest-operator, pytest-order, -r/home/ubuntu/repos/mysql-k8s-operator/requirements.txt
integration installed: anyio==3.6.2,asttokens==2.1.0,attrs==22.1.0,backcall==0.2.0,bcrypt==4.0.1,cachetools==5.2.0,certifi==2022.9.24,cffi==1.15.1,charset-normalizer==2.1.1,cryptography==38.0.2,decorator==5.1.1,exceptiongroup==1.0.4,executing==1.2.0,google-auth==2.14.1,h11==0.14.0,httpcore==0.16.2,httpx==0.23.1,idna==3.4,iniconfig==1.1.1,ipdb==0.13.9,ipython==8.7.0,jedi==0.18.2,Jinja2==3.1.2,jsonschema==4.16.0,juju==2.9.11,jujubundlelib==0.5.7,kubernetes==25.3.0,lightkube==0.11.0,lightkube-models==1.24.1.4,macaroonbakery==1.3.1,MarkupSafe==2.1.1,matplotlib-inline==0.1.6,mypy-extensions==0.4.3,mysql-connector-python==8.0.31,oauthlib==3.2.2,ops==1.5.4,packaging==21.3,paramiko==2.12.0,parso==0.8.3,pexpect==4.8.0,pickleshare==0.7.5,pluggy==1.0.0,prompt-toolkit==3.0.33,protobuf==3.20.1,ptyprocess==0.7.0,pure-eval==0.2.2,pyasn1==0.4.8,pyasn1-modules==0.2.8,pycparser==2.21,Pygments==2.13.0,pymacaroons==0.13.0,PyNaCl==1.5.0,pyparsing==3.0.9,pyRFC3339==1.1,pyrsistent==0.19.2,pytest==7.2.0,pytest-asyncio==0.20.2,pytest-operator==0.22.0,pytest-order==1.0.1,python-dateutil==2.8.2,pytz==2022.6,PyYAML==6.0,requests==2.28.1,requests-oauthlib==1.3.1,rfc3986==1.5.0,rsa==4.9,six==1.16.0,sniffio==1.3.0,stack-data==0.6.2,tenacity==8.0.1,theblues==0.5.2,toml==0.10.2,tomli==2.0.1,toposort==1.7,traitlets==5.5.0,typing-inspect==0.8.0,typing_extensions==4.4.0,urllib3==1.26.13,wcwidth==0.2.5,websocket-client==1.4.2,websockets==10.4
integration run-test-pre: PYTHONHASHSEED='3819183866'
integration run-test: commands[0] | pytest -v --tb native --ignore=/home/ubuntu/repos/mysql-k8s-operator/tests/unit --log-cli-level=INFO -s
============================= test session starts ==============================
platform linux -- Python 3.10.6, pytest-7.2.0, pluggy-1.0.0 -- /home/ubuntu/repos/mysql-k8s-operator/.tox/integration/bin/python
cachedir: .tox/integration/.pytest_cache
rootdir: /home/ubuntu/repos/mysql-k8s-operator, configfile: pyproject.toml
plugins: operator-0.22.0, order-1.0.1, anyio-3.6.2, asyncio-0.20.2
asyncio: mode=auto
collected 25 items                                                             

tests/integration/test_charm.py::test_build_and_deploy 
-------------------------------- live log setup --------------------------------
INFO     pytest_operator.plugin:plugin.py:625 Adding model micro:test-charm-xptw on cloud microk8s
-------------------------------- live log call ---------------------------------
INFO     pytest_operator.plugin:plugin.py:504 Using tmp_path: /home/ubuntu/repos/mysql-k8s-operator/.tox/integration/tmp/pytest/test-charm-xptw0
INFO     pytest_operator.plugin:plugin.py:948 Building charm mysql-k8s
INFO     pytest_operator.plugin:plugin.py:953 Built charm mysql-k8s in 1081.01s
INFO     juju.model:model.py:1924 Deploying local:focal/mysql-k8s-0
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [allocating] waiting: installing agent
  mysql-k8s/1 [allocating] waiting: installing agent
  mysql-k8s/2 [allocating] waiting: installing agent
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [executing] unknown: 
  mysql-k8s/1 [executing] unknown: 
  mysql-k8s/2 [executing] unknown: 
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [idle] waiting: Waiting for instance to join the cluster
  mysql-k8s/1 [idle] waiting: Waiting for instance to join the cluster
  mysql-k8s/2 [executing] active: 
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/1 [idle] waiting: Waiting for instance to join the cluster
  mysql-k8s/2 [executing] active: 
PASSED
------------------------------ live log teardown -------------------------------
INFO     pytest_operator.plugin:plugin.py:768 Model status:

Model            Controller  Cloud/Region        Version  SLA          Timestamp
test-charm-xptw  micro       microk8s/localhost  2.9.29   unsupported  16:05:29Z

App        Version                  Status  Scale  Charm      Channel  Rev  Address         Exposed  Message
mysql-k8s  8.0.31-0ubuntu0.22.04.1  active      3  mysql-k8s             0  10.152.183.196  no       

Unit          Workload  Agent  Address       Ports  Message
mysql-k8s/0   active    idle   10.1.198.205         
mysql-k8s/1   active    idle   10.1.198.204         
mysql-k8s/2*  active    idle   10.1.198.206         


INFO     pytest_operator.plugin:plugin.py:774 Juju error logs:


INFO     pytest_operator.plugin:plugin.py:861 Resetting model test-charm-xptw...
INFO     pytest_operator.plugin:plugin.py:850    Destroying applications mysql-k8s
INFO     pytest_operator.plugin:plugin.py:866 Not waiting on reset to complete.
INFO     pytest_operator.plugin:plugin.py:839 Forgetting main...

tests/integration/test_tls.py::test_build_and_deploy 
-------------------------------- live log setup --------------------------------
INFO     pytest_operator.plugin:plugin.py:625 Adding model micro:test-tls-ro54 on cloud microk8s
-------------------------------- live log call ---------------------------------
INFO     pytest_operator.plugin:plugin.py:504 Using tmp_path: /home/ubuntu/repos/mysql-k8s-operator/.tox/integration/tmp/pytest/test-tls-ro540
INFO     pytest_operator.plugin:plugin.py:948 Building charm mysql-k8s
INFO     pytest_operator.plugin:plugin.py:953 Built charm mysql-k8s in 21.31s
INFO     juju.model:model.py:1924 Deploying local:focal/mysql-k8s-0
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [allocating] waiting: installing agent
  mysql-k8s/1 [allocating] waiting: installing agent
  mysql-k8s/2 [allocating] waiting: installing agent
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [idle] maintenance: Initialising mysqld
  mysql-k8s/1 [idle] maintenance: Initialising mysqld
  mysql-k8s/2 [allocating] waiting: installing agent
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [executing] active: 
  mysql-k8s/1 [executing] waiting: Waiting for instance to join the cluster
  mysql-k8s/2 [executing] waiting: Waiting for instance to join the cluster
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [executing] active: 
  mysql-k8s/1 [executing] active: 
  mysql-k8s/2 [idle] active: 
PASSED
------------------------------ live log teardown -------------------------------
INFO     pytest_operator.plugin:plugin.py:768 Model status:

Model          Controller  Cloud/Region        Version  SLA          Timestamp
test-tls-ro54  micro       microk8s/localhost  2.9.29   unsupported  16:07:45Z

App        Version                  Status  Scale  Charm      Channel  Rev  Address         Exposed  Message
mysql-k8s  8.0.31-0ubuntu0.22.04.1  active      3  mysql-k8s             0  10.152.183.175  no       

Unit          Workload  Agent  Address       Ports  Message
mysql-k8s/0*  active    idle   10.1.198.214         
mysql-k8s/1   active    idle   10.1.198.215         
mysql-k8s/2   active    idle   10.1.198.216         


INFO     pytest_operator.plugin:plugin.py:774 Juju error logs:

controller-0: 16:06:11 ERROR juju.worker.caasapplicationprovisioner.runner exited "mysql-k8s": Operation cannot be fulfilled on pods "mysql-k8s-0": the object has been modified; please apply your changes to the latest version and try again

INFO     pytest_operator.plugin:plugin.py:861 Resetting model test-tls-ro54...
INFO     pytest_operator.plugin:plugin.py:850    Destroying applications mysql-k8s
INFO     pytest_operator.plugin:plugin.py:866 Not waiting on reset to complete.
INFO     pytest_operator.plugin:plugin.py:839 Forgetting main...

tests/integration/high_availability/test_replication.py::test_build_and_deploy 
-------------------------------- live log setup --------------------------------
INFO     pytest_operator.plugin:plugin.py:625 Adding model micro:test-replication-pujw on cloud microk8s
-------------------------------- live log call ---------------------------------
INFO     pytest_operator.plugin:plugin.py:504 Using tmp_path: /home/ubuntu/repos/mysql-k8s-operator/.tox/integration/tmp/pytest/test-replication-pujw0
INFO     pytest_operator.plugin:plugin.py:948 Building charm mysql-k8s
INFO     pytest_operator.plugin:plugin.py:953 Built charm mysql-k8s in 42.26s
INFO     juju.model:model.py:1924 Deploying local:focal/mysql-k8s-0
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [allocating] waiting: installing agent
  mysql-k8s/1 [allocating] waiting: installing agent
  mysql-k8s/2 [allocating] waiting: installing agent
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [executing] maintenance: Initialising mysqld
  mysql-k8s/1 [executing] maintenance: Initialising mysqld
  mysql-k8s/2 [executing] maintenance: Initialising mysqld
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [idle] waiting: Waiting for instance to join the cluster
  mysql-k8s/1 [idle] waiting: Waiting for instance to join the cluster
  mysql-k8s/2 [executing] active: 
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [idle] active: 
  mysql-k8s/1 [idle] active: 
  mysql-k8s/2 [idle] active: 
INFO     pytest_operator.plugin:plugin.py:504 Using tmp_path: /home/ubuntu/repos/mysql-k8s-operator/.tox/integration/tmp/pytest/test-replication-pujw0
INFO     pytest_operator.plugin:plugin.py:948 Building charm application
INFO     pytest_operator.plugin:plugin.py:953 Built charm application in 207.11s
INFO     juju.model:model.py:1924 Deploying local:focal/application-0
INFO     juju.model:model.py:2526 Waiting for model:
  application/0 [allocating] waiting: installing agent
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [executing] active: 
  mysql-k8s/1 [executing] active: 
  mysql-k8s/2 [executing] active: 
  application/0 [executing] waiting: 
PASSED
------------------------------ live log teardown -------------------------------
INFO     pytest_operator.plugin:plugin.py:768 Model status:

Model                  Controller  Cloud/Region        Version  SLA          Timestamp
test-replication-pujw  micro       microk8s/localhost  2.9.29   unsupported  16:14:50Z

App          Version                  Status  Scale  Charm        Channel  Rev  Address         Exposed  Message
application                           active      1  application             0  10.152.183.186  no       
mysql-k8s    8.0.31-0ubuntu0.22.04.1  active      3  mysql-k8s               0  10.152.183.170  no       

Unit            Workload  Agent  Address       Ports  Message
application/0*  active    idle   10.1.198.227         
mysql-k8s/0     active    idle   10.1.198.224         
mysql-k8s/1     active    idle   10.1.198.225         
mysql-k8s/2*    active    idle   10.1.198.226         


INFO     pytest_operator.plugin:plugin.py:774 Juju error logs:


INFO     pytest_operator.plugin:plugin.py:861 Resetting model test-replication-pujw...
INFO     pytest_operator.plugin:plugin.py:850    Destroying applications mysql-k8s
INFO     pytest_operator.plugin:plugin.py:850    Destroying applications application
INFO     pytest_operator.plugin:plugin.py:866 Not waiting on reset to complete.
INFO     pytest_operator.plugin:plugin.py:839 Forgetting main...

tests/integration/high_availability/test_self_healing.py::test_build_and_deploy 
-------------------------------- live log setup --------------------------------
INFO     pytest_operator.plugin:plugin.py:625 Adding model micro:test-self-healing-d0xa on cloud microk8s
-------------------------------- live log call ---------------------------------
INFO     juju.model:model.py:1924 Deploying local:focal/mysql-k8s-0
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [allocating] waiting: installing agent
  mysql-k8s/1 [allocating] waiting: installing agent
  mysql-k8s/2 [allocating] waiting: installing agent
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [idle] maintenance: Initialising mysqld
  mysql-k8s/1 [executing] maintenance: Initialising mysqld
  mysql-k8s/2 [idle] maintenance: Initialising mysqld
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [idle] active: 
  mysql-k8s/1 [executing] active: 
  mysql-k8s/2 [executing] waiting: Waiting for instance to join the cluster
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [executing] active: 
  mysql-k8s/1 [executing] active: 
  mysql-k8s/2 [executing] active: 
INFO     juju.model:model.py:1924 Deploying local:focal/application-0
INFO     juju.model:model.py:2526 Waiting for model:
  application/0 [allocating] waiting: installing agent
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [executing] active: 
  mysql-k8s/1 [idle] active: 
  mysql-k8s/2 [executing] active: 
  application/0 [idle] waiting: 
PASSED
------------------------------ live log teardown -------------------------------
INFO     pytest_operator.plugin:plugin.py:768 Model status:

Model                   Controller  Cloud/Region        Version  SLA          Timestamp
test-self-healing-d0xa  micro       microk8s/localhost  2.9.29   unsupported  16:17:43Z

App          Version                  Status  Scale  Charm        Channel  Rev  Address         Exposed  Message
application                           active      1  application             0  10.152.183.222  no       
mysql-k8s    8.0.31-0ubuntu0.22.04.1  active      3  mysql-k8s               0  10.152.183.102  no       

Unit            Workload  Agent  Address       Ports  Message
application/0*  active    idle   10.1.198.238         
mysql-k8s/0     active    idle   10.1.198.233         
mysql-k8s/1*    active    idle   10.1.198.232         
mysql-k8s/2     active    idle   10.1.198.234         


INFO     pytest_operator.plugin:plugin.py:774 Juju error logs:

controller-0: 16:16:58 ERROR juju.worker.caasapplicationprovisioner.runner exited "application": Operation cannot be fulfilled on pods "application-0": the object has been modified; please apply your changes to the latest version and try again

INFO     pytest_operator.plugin:plugin.py:861 Resetting model test-self-healing-d0xa...
INFO     pytest_operator.plugin:plugin.py:850    Destroying applications mysql-k8s
INFO     pytest_operator.plugin:plugin.py:850    Destroying applications application
INFO     pytest_operator.plugin:plugin.py:866 Not waiting on reset to complete.
INFO     pytest_operator.plugin:plugin.py:839 Forgetting main...

tests/integration/relations/test_database.py::test_build_and_deploy 
-------------------------------- live log setup --------------------------------
INFO     pytest_operator.plugin:plugin.py:625 Adding model micro:test-database-kga8 on cloud microk8s
-------------------------------- live log call ---------------------------------
INFO     pytest_operator.plugin:plugin.py:504 Using tmp_path: /home/ubuntu/repos/mysql-k8s-operator/.tox/integration/tmp/pytest/test-database-kga80
INFO     pytest_operator.plugin:plugin.py:948 Building charm mysql-k8s
INFO     pytest_operator.plugin:plugin.py:953 Built charm mysql-k8s in 43.58s
INFO     pytest_operator.plugin:plugin.py:504 Using tmp_path: /home/ubuntu/repos/mysql-k8s-operator/.tox/integration/tmp/pytest/test-database-kga80
INFO     pytest_operator.plugin:plugin.py:948 Building charm application
INFO     pytest_operator.plugin:plugin.py:953 Built charm application in 152.94s
INFO     juju.model:model.py:1924 Deploying local:focal/mysql-k8s-0
INFO     juju.model:model.py:1924 Deploying local:focal/application-0
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [allocating] waiting: installing agent
  mysql-k8s/1 [allocating] waiting: installing agent
  mysql-k8s/2 [allocating] waiting: installing agent
INFO     juju.model:model.py:2526 Waiting for model:
  application/0 [allocating] waiting: installing agent
  application/1 [allocating] waiting: installing agent
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [idle] maintenance: Initialising mysqld
  mysql-k8s/1 [idle] maintenance: Initialising mysqld
  mysql-k8s/2 [idle] maintenance: Initialising mysqld
INFO     juju.model:model.py:2526 Waiting for model:
  application/0 [idle] waiting: Waiting for relation
  application/1 [idle] waiting: Waiting for relation
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [executing] active: 
  mysql-k8s/1 [idle] waiting: Waiting for instance to join the cluster
  mysql-k8s/2 [idle] waiting: Waiting for instance to join the cluster
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [idle] active: 
  mysql-k8s/1 [idle] active: 
  mysql-k8s/2 [idle] active: 
PASSED
------------------------------ live log teardown -------------------------------
INFO     pytest_operator.plugin:plugin.py:768 Model status:

Model               Controller  Cloud/Region        Version  SLA          Timestamp
test-database-kga8  micro       microk8s/localhost  2.9.29   unsupported  16:22:55Z

App          Version                  Status   Scale  Charm        Channel  Rev  Address         Exposed  Message
application                           waiting      2  application             0  10.152.183.183  no       installing agent
mysql-k8s    8.0.31-0ubuntu0.22.04.1  active       3  mysql-k8s               0  10.152.183.49   no       

Unit            Workload  Agent  Address       Ports  Message
application/0   waiting   idle   10.1.198.250         Waiting for relation
application/1*  waiting   idle   10.1.198.249         Waiting for relation
mysql-k8s/0*    active    idle   10.1.198.246         
mysql-k8s/1     active    idle   10.1.198.247         
mysql-k8s/2     active    idle   10.1.198.248         


INFO     pytest_operator.plugin:plugin.py:774 Juju error logs:


INFO     pytest_operator.plugin:plugin.py:861 Resetting model test-database-kga8...
INFO     pytest_operator.plugin:plugin.py:850    Destroying applications mysql-k8s
INFO     pytest_operator.plugin:plugin.py:850    Destroying applications application
INFO     pytest_operator.plugin:plugin.py:866 Not waiting on reset to complete.
INFO     pytest_operator.plugin:plugin.py:839 Forgetting main...

tests/integration/relations/test_osm_mysql.py::test_deploy_and_relate_osm_bundle 
-------------------------------- live log setup --------------------------------
INFO     pytest_operator.plugin:plugin.py:625 Adding model micro:test-osm-mysql-0gzm on cloud microk8s
-------------------------------- live log call ---------------------------------
INFO     pytest_operator.plugin:plugin.py:504 Using tmp_path: /home/ubuntu/repos/mysql-k8s-operator/.tox/integration/tmp/pytest/test-osm-mysql-0gzm0
INFO     pytest_operator.plugin:plugin.py:948 Building charm mysql-k8s
INFO     pytest_operator.plugin:plugin.py:953 Built charm mysql-k8s in 43.31s
INFO     juju.model:model.py:1924 Deploying local:focal/mysql-k8s-0
INFO     juju.model:model.py:1924 Deploying ch:amd64/focal/charmed-osm-mongodb-k8s-29
INFO     juju.model:model.py:1924 Deploying ch:amd64/focal/charmed-osm-zookeeper-k8s-37
INFO     juju.model:model.py:1924 Deploying ch:amd64/focal/charmed-osm-kafka-k8s-21
INFO     juju.model:model.py:1924 Deploying ch:amd64/focal/osm-pol-1
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [allocating] waiting: installing agent
  mysql-k8s/1 [allocating] waiting: installing agent
  mysql-k8s/2 [allocating] waiting: installing agent
  osm-kafka/0 [allocating] waiting: installing agent
  osm-zookeeper/0 [allocating] waiting: installing agent
  osm-mongodb/0 [allocating] waiting: installing agent
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [executing] maintenance: installing charm software
  mysql-k8s/1 [executing] maintenance: installing charm software
  mysql-k8s/2 [allocating] maintenance: installing charm software
  osm-kafka/0 [allocating] waiting: installing agent
  osm-zookeeper/0 [allocating] waiting: installing agent
  osm-mongodb/0 [allocating] waiting: agent initializing
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [executing] maintenance: Initialising mysqld
  mysql-k8s/1 [idle] maintenance: Initialising mysqld
  mysql-k8s/2 [idle] maintenance: Initialising mysqld
  osm-kafka/0 [executing] waiting: Waiting for Zookeeper to be ready
  osm-zookeeper/0 [executing] active: ready
  osm-mongodb/0 [idle] active: ready
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [executing] active: 
  mysql-k8s/1 [executing] waiting: Waiting for instance to join the cluster
  mysql-k8s/2 [executing] waiting: Waiting for instance to join the cluster
  osm-kafka/0 [executing] active: ready
  osm-zookeeper/0 [executing] active: ready
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [executing] active: 
  mysql-k8s/1 [idle] active: 
  mysql-k8s/2 [idle] waiting: Waiting for instance to join the cluster
  osm-zookeeper/0 [idle] active: ready
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/1 [idle] active: 
  mysql-k8s/2 [idle] active: 
  osm-zookeeper/0 [idle] active: ready
INFO     juju.model:model.py:2526 Waiting for model:
  osm-zookeeper/0 [idle] active: ready
INFO     juju.model:model.py:2526 Waiting for model:
  osm-zookeeper/0 [idle] active: ready
INFO     juju.model:model.py:2526 Waiting for model:
  osm-zookeeper/0 [idle] maintenance: Sending Zookeeper configuration
INFO     juju.model:model.py:2526 Waiting for model:
  osm-zookeeper/0 [idle] active: ready
INFO     juju.model:model.py:2526 Waiting for model:
  mysql-k8s/0 [idle] active: 
  mysql-k8s/1 [idle] active: 
  mysql-k8s/2 [executing] active: 
  osm-keystone/0 [idle] blocked: mysql relation is missing
  osm-kafka/0 [idle] active: ready
  osm-zookeeper/0 [idle] active: ready
  osm-mongodb/0 [idle] active: ready
INFO     juju.model:model.py:2526 Waiting for model:
  osm-zookeeper/0 [idle] active: ready
INFO     juju.model:model.py:2526 Waiting for model:
  osm-zookeeper/0 [idle] active: ready
INFO     juju.model:model.py:2526 Waiting for model:
  osm-zookeeper/0 [idle] active: ready
PASSED
------------------------------ live log teardown -------------------------------
INFO     pytest_operator.plugin:plugin.py:768 Model status:

Model                Controller  Cloud/Region        Version  SLA          Timestamp
test-osm-mysql-0gzm  micro       microk8s/localhost  2.9.29   unsupported  16:30:07Z

App            Version                         Status   Scale  Charm                      Channel    Rev  Address         Exposed  Message
mysql-k8s      8.0.31-0ubuntu0.22.04.1         active       3  mysql-k8s                               0  10.152.183.205  no       
osm-kafka      wurstmeister/kafka:2.12-2.2.1   active       1  charmed-osm-kafka-k8s      stable      21  10.152.183.77   no       
osm-keystone                                   active       1  osm-keystone               edge         5  10.152.183.49   no       
osm-mongodb    mongo:latest                    active       1  charmed-osm-mongodb-k8s    stable      29  10.152.183.92   no       
osm-pol                                        blocked      1  osm-pol                    candidate    1                  no       Need kafka, mongodb, mysql relations
osm-zookeeper  .../kubernetes-zookeeper:1....  active       1  charmed-osm-zookeeper-k8s  stable      37  10.152.183.168  no       

Unit              Workload  Agent      Address       Ports                       Message
mysql-k8s/0*      active    executing  10.1.198.201                              
mysql-k8s/1       active    idle       10.1.198.205                              
mysql-k8s/2       active    idle       10.1.198.203                              
osm-kafka/0*      active    idle       10.1.198.219  9092/TCP                    ready
osm-keystone/0*   active    idle       10.1.198.204                              
osm-mongodb/0*    active    executing  10.1.198.215  27017/TCP                   ready
osm-pol/0*        blocked   executing                                            Need kafka, mongodb, mysql relations
osm-zookeeper/0*  active    idle       10.1.198.214  2181/TCP,2888/TCP,3888/TCP  ready


INFO     pytest_operator.plugin:plugin.py:774 Juju error logs:

application-osm-pol: 16:24:55 ERROR unit.osm-pol/0.juju-log Relation missing error: Need kafka, mongodb, mysql relations
application-osm-pol: 16:25:03 ERROR unit.osm-pol/0.juju-log Relation missing error: Need kafka, mongodb, mysql relations

INFO     pytest_operator.plugin:plugin.py:861 Resetting model test-osm-mysql-0gzm...
INFO     pytest_operator.plugin:plugin.py:850    Destroying applications mysql-k8s
INFO     pytest_operator.plugin:plugin.py:850    Destroying applications osm-mongodb
INFO     pytest_operator.plugin:plugin.py:850    Destroying applications osm-zookeeper
INFO     pytest_operator.plugin:plugin.py:850    Destroying applications osm-kafka
INFO     pytest_operator.plugin:plugin.py:850    Destroying applications osm-keystone
INFO     pytest_operator.plugin:plugin.py:850    Destroying applications osm-pol
INFO     pytest_operator.plugin:plugin.py:866 Not waiting on reset to complete.
INFO     pytest_operator.plugin:plugin.py:839 Forgetting main...

tests/integration/test_charm.py::test_consistent_data_replication_across_cluster 
-------------------------------- live log setup --------------------------------
INFO     pytest_operator.plugin:plugin.py:625 Adding model micro:test-charm-vjwb on cloud microk8s
FAILED
------------------------------ live log teardown -------------------------------
INFO     pytest_operator.plugin:plugin.py:768 Model status:

Model            Controller  Cloud/Region        Version  SLA          Timestamp
test-charm-vjwb  micro       microk8s/localhost  2.9.29   unsupported  16:30:13Z


INFO     pytest_operator.plugin:plugin.py:774 Juju error logs:


INFO     pytest_operator.plugin:plugin.py:793 juju-crashdump command was not found.
INFO     pytest_operator.plugin:plugin.py:861 Resetting model test-charm-vjwb...
INFO     pytest_operator.plugin:plugin.py:866 Not waiting on reset to complete.
INFO     pytest_operator.plugin:plugin.py:839 Forgetting main...
carlcsaposs-canonical added a commit that referenced this issue Nov 28, 2022
Closes #117

Due to `pytest-order`, integration tests run out of order when run together. Use tox label to run each integration test module separately
@carlcsaposs-canonical
Copy link
Contributor Author

Potential solution (run all integration-* environments with one command)`: tox-dev/tox#647
However, that requires tox >=4.0 which is currently unstable

carlcsaposs-canonical added a commit that referenced this issue Nov 28, 2022
Closes #117

Due to `pytest-order`, integration tests run out of order when run together
carlcsaposs-canonical added a commit that referenced this issue Dec 6, 2022
Closes #117

Due to `pytest-order`, integration tests run out of order when run together
carlcsaposs-canonical added a commit that referenced this issue Dec 14, 2022
Closes #117

Due to `pytest-order`, integration tests run out of order when run together
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant