Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

fix fc::temp_directory usage in tester #7634

Merged
merged 1 commit into from
Jul 10, 2019
Merged

Conversation

spoonincode
Copy link
Contributor

Change Description

Can't have fc::temp_directory scoped to default_config() because that means once defualt_config() returns the only attempt at trying to clean up the tempdir is at that time -- way before any files are actually created. Make default_config() use an fc::temp_directory which tester already has anyways. So, once tester is destroyed that's when the fc::temp_directory falls out of scope and it can properly clean up at that point. A run through unit_test doesn't leave behind all its data files any longer.

Fixes #6800

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

Can't have fc::temp_directory scoped to default_config() because that means once defualt_config() returns the only attempt at trying to clean up the tempdir is at that time -- way before any files are actually created. Make default_config() use an fc::temp_directory which tester already has anyways. So, once tester is destroyed that's when the fc::temp_directory falls out of scope and it can properly clean up at that point. A run through unit_test doesn't leave behind all its data files any longer.
@spoonincode spoonincode merged commit dcacfef into develop Jul 10, 2019
@spoonincode spoonincode deleted the fix_unittest_temp_dir branch July 10, 2019 22:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants