Skip to content
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

adopt new integration blueprint #954

Merged
merged 8 commits into from
Oct 31, 2023
Merged

adopt new integration blueprint #954

merged 8 commits into from
Oct 31, 2023

Conversation

lbbrhzn
Copy link
Owner

@lbbrhzn lbbrhzn commented Oct 28, 2023

adopt new integration blueprint, to allow more recent version of pytest-homeassistant-custom-component
see https://github.com/ludeeus/integration_blueprint

With a recent version of pytest-homeassistant-custom-component some test failures pop-up, which need to be solved.

@lbbrhzn lbbrhzn requested a review from drc38 October 28, 2023 22:30
@lbbrhzn
Copy link
Owner Author

lbbrhzn commented Oct 28, 2023

@drc38, do you know what to do to fix the following error?
I get the same failures when i run the pytest from the command line.

ERROR tests/test_charge_point.py::test_cms_responses - Failed: Lingering task after test <Task pending name='Task-695' coro=<ChargePoint.send_stop_transaction() running at /home/runner/work/ocpp/ocpp/tests/test_charge_point.py:1103> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[gather.<locals>._done_callback() at /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/asyncio/tasks.py:764]>

@lbbrhzn lbbrhzn changed the title adopt https://github.com/ludeeus/integration_blueprint adopt new integration blueprint Oct 28, 2023
@drc38
Copy link
Collaborator

drc38 commented Oct 29, 2023

I assume it is this line:
1102: while self.active_transactionId == 0:
try commenting it out.

@lbbrhzn
Copy link
Owner Author

lbbrhzn commented Oct 29, 2023

that does not solve the problem, we then get an error with unknown transaction id=0

@drc38
Copy link
Collaborator

drc38 commented Oct 29, 2023

that does not solve the problem, we then get an error with unknown transaction id=0

How about replacing line below
1103: await asyncio.sleep(1)
With return

@lbbrhzn
Copy link
Owner Author

lbbrhzn commented Oct 29, 2023

Also does not work. Maybe you can help me out through codespace:

https://prod.liveshare.vsengsaas.visualstudio.com/join?138371B71D13139074524B061EC019DD6C9F

@lbbrhzn
Copy link
Owner Author

lbbrhzn commented Oct 30, 2023

Added @chrisK824 as a reviewer. He has experience in making an OCPP charging point simulator.

@lbbrhzn lbbrhzn self-assigned this Oct 30, 2023
@drc38
Copy link
Collaborator

drc38 commented Oct 30, 2023

Also does not work. Maybe you can help me out through codespace:

https://prod.liveshare.vsengsaas.visualstudio.com/join?138371B71D13139074524B061EC019DD6C9F

Tried to access link but suspect time difference is a problem, I'm in NZ. Should have some time at weekend to take a look at this.

@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Merging #954 (b175c6b) into main (94fd8d5) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #954   +/-   ##
=======================================
  Coverage   90.34%   90.34%           
=======================================
  Files          10       10           
  Lines        1347     1347           
  Branches      191      224   +33     
=======================================
  Hits         1217     1217           
  Misses         75       75           
  Partials       55       55           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@drc38
Copy link
Collaborator

drc38 commented Oct 31, 2023

Looks like the timeout cannot be relied upon to close tasks, solution committed is not very elegant but gets around the issue.

Copy link
Owner Author

@lbbrhzn lbbrhzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it may not be elegant, but it works! Thanks a lot!

@lbbrhzn lbbrhzn merged commit af4788a into main Oct 31, 2023
8 checks passed
@lbbrhzn lbbrhzn deleted the new_integration_blueprint branch October 31, 2023 08:06
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 this pull request may close these issues.

None yet

2 participants