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

Intermitted expressions failures during testing #1190

Closed
bodiam opened this issue May 7, 2024 · 8 comments
Closed

Intermitted expressions failures during testing #1190

bodiam opened this issue May 7, 2024 · 8 comments

Comments

@bodiam
Copy link
Contributor

bodiam commented May 7, 2024

Describe the bug

It seems there's another or new bug in our tests:

 10:28:42.078 [ERROR] Failures: 
10:28:42.078 [ERROR] net.datafaker.providers.base.RestaurantTest.name
10:28:42.078 [ERROR]   Run 18: RestaurantTest.name:33 
Expecting actual:
  "## Bakery"
not to contain:
  ["#", "?"]
but found:
  ["#"]

A clear and concise description of what the bug is.

To Reproduce

I cannot.

Expected behavior

The test should pass

Versions:

  • Faker Version 2.2.x-snapshot
@bodiam
Copy link
Contributor Author

bodiam commented May 7, 2024

@bodiam
Copy link
Contributor Author

bodiam commented May 7, 2024

@snuyanzin Do you have any idea which part of the code can cause this? Is this related to the COW map, or some other part of the code? It seems are tests are failing more and more, but I'm not entirely sure where to look, plus it seems quite random. If you have a pointer on where to look, that would be greatly appreciated!

@bodiam bodiam changed the title More broken tests Expressions sometimes fail during tests May 7, 2024
@bodiam bodiam changed the title Expressions sometimes fail during tests Intermitted expressions failures during testing May 7, 2024
@snuyanzin
Copy link
Collaborator

That looks strange, it looks like sometimes it doesn't take into account possible expressions inside values.
I'm not sure whether it is COW, currently it doesn't look like that

@bodiam
Copy link
Contributor Author

bodiam commented May 8, 2024

I've ran the test locally quite a few times, and I'm not able to reproduce it, but I will have some time over the weekend to look into this.

@snuyanzin
Copy link
Collaborator

If I'm not mistaken @RVRhub is also looking at it, please correct me if I'm wrong

@RVRhub
Copy link
Contributor

RVRhub commented May 19, 2024

Yes, I started looking into this problem.
I have determined that this is because sometimes resolveExpression uses a Supplier that retrieves data from a file.

@snuyanzin
Copy link
Collaborator

@bodiam it might happen that @RVRhub has fixed it within #1198 (not 100%)
however now it looks much more stable, so if you know how to reproduce it would worth to check it against the latest main

@bodiam
Copy link
Contributor Author

bodiam commented May 20, 2024

@snuyanzin no idea how to reproduce it, I just know it happens sometimes. Let's monitor it for a week or so, and then close this issue if it's fixed.

@bodiam bodiam closed this as completed May 25, 2024
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

No branches or pull requests

3 participants