Skip to content

Recall functions are uncovered but truly executed. #657

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

Open
nedbat opened this issue Apr 27, 2018 · 5 comments
Open

Recall functions are uncovered but truly executed. #657

nedbat opened this issue Apr 27, 2018 · 5 comments
Labels
exotic Unusual execution environment

Comments

@nedbat
Copy link
Owner

nedbat commented Apr 27, 2018

Originally reported by rebecca (Bitbucket: liulrebecca, GitHub: Unknown)


in one python file called vault.py, line 148 is executed, but function eh_evt_2_events and prepare_eh_evt_4_vault which are recalled are not marked as covered:
line 148: df = evt_hub_rdd.flatMap(lambda evt: eh_evt_2_events(evt)).map(lambda evt: prepare_eh_evt_4_vault(evt, batch_date, batch_key)).map(lambda evt_dict: Row(**evt_dict)).toDF()

This file is to process data and save to vault: Uploaded data are processed and saved in vault as expected when testing.


@nedbat
Copy link
Owner Author

nedbat commented Apr 27, 2018

@liulrebecca I don't understand all that's going on here because I don't have all the code. But send_queue_message sounds like the work is happening in a different process? You should read up on how to measure subprocesses (http://coverage.readthedocs.io/en/latest/subprocess.html) and see if that helps.

@nedbat
Copy link
Owner Author

nedbat commented May 3, 2018

Original comment by rebecca (Bitbucket: liulrebecca, GitHub: Unknown)


@nedbat Thanks for your help. I will read up the articles.
BTW, the codes are running in a spark cluster, we found that some codes are executed in worker nodes, but coverage.py is running in the master node, maybe it's the root cause why some codes are not marked as covered. I will try again.

@nedbat
Copy link
Owner Author

nedbat commented May 3, 2018

Issue #658 is also about PySpark, but I don't know enough to know if they are related.

@nedbat
Copy link
Owner Author

nedbat commented May 4, 2018

Original comment by Abdeali Kothari (Bitbucket: AbdealiJK, GitHub: AbdealiJK)


The #658 is running on a single machine (local-mode) of spark. So, it may not be (but not sure myself)

@nedbat nedbat added major bug Something isn't working run labels Jun 23, 2018
@nedbat nedbat removed the 4.4 label Aug 17, 2018
@nedbat nedbat added exotic Unusual execution environment and removed major bug Something isn't working run labels Jan 15, 2020
@nedbat
Copy link
Owner Author

nedbat commented Apr 21, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exotic Unusual execution environment
Projects
None yet
Development

No branches or pull requests

1 participant