Skip to content

Use read action to access documents #850 #979

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

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

ArsenHD
Copy link
Collaborator

@ArsenHD ArsenHD commented Sep 20, 2022

Description

I could not reproduce issue #850, but it seems like the exception occurs because the read lock is not acquired. In this MR I add the read lock acquisition for accessing the Document instances.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Manual Scenario

It is important that after this change util class generation still functions normally. I manually checked how it works in different possible cases.

  • org.utbot.examples.structures.StandardStructures (without mocks) - util class with no mock support is generated
  • org.utbot.examples.mock.CommonMocksExample (mock strategy: mock class environment) - util class generated at previous step is updated to support mocks
  • generated tests on org.utbot.examples.objects.AnonymousClassesExample into a different test source root of the same module - util methods are imported from the existing util class from another test source root (no new util class is created)

Checklist (remove irrelevant options):

  • The change followed the style guidelines of the UTBot project
  • Self-review of the code is passed
  • The change contains enough commentaries, particularly in hard-to-understand areas
  • New documentation is provided or existed one is altered
  • No new warnings
  • New tests have been added
  • All tests pass locally with my changes

@Vassiliy-Kudryashov Vassiliy-Kudryashov merged commit c35eb03 into main Sep 28, 2022
@Vassiliy-Kudryashov Vassiliy-Kudryashov deleted the fix-util-class-overwrite branch September 28, 2022 12:29
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.

Throwable falls from overwriteUtilClass when test is regenerated
2 participants