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

feat: v3 functionality from bxcodec/faker #6

Merged
merged 8 commits into from
Sep 19, 2022
Merged

Conversation

bxcodec
Copy link
Contributor

@bxcodec bxcodec commented Sep 11, 2022

fix #5

@bxcodec bxcodec marked this pull request as ready for review September 12, 2022 16:06
@bxcodec
Copy link
Contributor Author

bxcodec commented Sep 12, 2022

@wolf-joe can you help to re-review? I missed this when porting from the old repo.

Also the test about the TestRandomMaxMinMapSliceSize is not stable. Sometimes I got this error <> due to the randomized result. Can you help to fix take a look on this? It's related to bxcodec/faker#173


=== Failed
=== FAIL: . TestRandomMaxMinMapSliceSize (0.00s)
    faker_test.go:2246: map (len:2) not expect length with test case {max:2 min:3 expect:3}

DONE 123 tests, 1 failure in 0.512s
make: *** [Makefile:33: run-tests] Error 1

@@ -2316,3 +2437,18 @@ func TestFakeData_RecursiveType(t *testing.T) {
}
}
}

func TestFakeDate_ConcurrentSafe(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this test function may not need output anything, otherwise terminal will full of meaningless text

@wolf-joe
Copy link
Contributor

@wolf-joe can you help to re-review? I missed this when porting from the old repo.

Also the test about the TestRandomMaxMinMapSliceSize is not stable. Sometimes I got this error <> due to the randomized result. Can you help to fix take a look on this? It's related to bxcodec/faker#173


=== Failed
=== FAIL: . TestRandomMaxMinMapSliceSize (0.00s)
    faker_test.go:2246: map (len:2) not expect length with test case {max:2 min:3 expect:3}

DONE 123 tests, 1 failure in 0.512s
make: *** [Makefile:33: run-tests] Error 1

getFakedValue may generate a map with duplicated key, so the real length may be smaller than expected. it's a little tricky

@bxcodec
Copy link
Contributor Author

bxcodec commented Sep 17, 2022

@wolf-joe any idea how to solve that?

@wolf-joe
Copy link
Contributor

@wolf-joe any idea how to solve that?

Noop for now

@bxcodec bxcodec merged commit 6365ba7 into main Sep 19, 2022
@bxcodec bxcodec deleted the fix/map-interface branch September 19, 2022 16:52
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.

Concurrent map writes error when calling faker in parrallel
2 participants