Skip to content

Commit

Permalink
fix test; make package use dev version by default
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenyu-ms committed Jan 2, 2025
1 parent 7110fe0 commit 47b0da7
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
- name: Set up Kafka for tests
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
wget https://archive.apache.org/dist/kafka/3.5.2/kafka_2.13-3.5.2.tgz -O kafka.tgz
wget https://dlcdn.apache.org/kafka/3.9.0/kafka_2.13-3.9.0.tgz -O kafka.tgz
sudo mkdir /opt/kafka
sudo chown -R $USER:$USER /opt/kafka
tar zxf kafka.tgz -C /opt/kafka --strip-components 1
Expand Down
6 changes: 4 additions & 2 deletions testplan/exporters/testing/xml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,11 @@ def export(
)
xml_dir = pathlib.Path(self.cfg.xml_dir).resolve()

# TODO: what if xml_dir is a file?
if xml_dir.exists():
shutil.rmtree(xml_dir)
if xml_dir.is_dir():
shutil.rmtree(xml_dir)
else:
xml_dir.unlink()

xml_dir.mkdir(parents=True, exist_ok=True)

Expand Down
2 changes: 1 addition & 1 deletion testplan/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

__version__ = "24.9.2"

dev_build = int(os.environ.get("DEV_BUILD", "0"))
dev_build = int(os.environ.get("DEV_BUILD", "1"))
dev_suffix = f"dev{int(time.time())}" if dev_build else ""

__build_version__ = f"{__version__}{dev_suffix}"
4 changes: 4 additions & 0 deletions tests/functional/testplan/cli/data/curr.data
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,10 @@
"label": null,
"tags_index": {},
"information": [
[
"testplan_version",
"24.9.2.dev1735810598"
],
[
"user",
"unknown"
Expand Down
3 changes: 0 additions & 3 deletions tests/functional/testplan/runnable/interactive/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ def plan3(tmpdir):
],
"name": "ExampleSuite",
"parent_uids": ["InteractiveAPITest", "ExampleMTest"],
"part": None,
"status": "unknown",
"runtime_status": "ready",
"counter": {
Expand Down Expand Up @@ -312,7 +311,6 @@ def plan3(tmpdir):
],
"name": "ExampleSuite",
"parent_uids": ["InteractiveAPITest", "ExampleMTest"],
"part": None,
"status": "unknown",
"runtime_status": "ready",
"counter": {"failed": 0, "passed": 0, "total": 7, "unknown": 7},
Expand Down Expand Up @@ -440,7 +438,6 @@ def plan3(tmpdir):
"ExampleMTest",
"ExampleSuite",
],
"part": None,
"runtime_status": "ready",
"status": "unknown",
"tags": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from testplan import TestplanMock
from testplan.common import entity
from testplan.common.utils.comparison import compare, ReportOptions
from testplan.common.utils.comparison import compare
from testplan.common.utils.context import context
from testplan.common.utils.logger import USER_INFO
from testplan.common.utils.timing import wait
Expand Down

0 comments on commit 47b0da7

Please sign in to comment.