nickva commented on code in PR #4151:
URL: https://github.com/apache/couchdb/pull/4151#discussion_r950261344
##########
src/couch_replicator/test/eunit/couch_replicator_many_leaves_tests.erl:
##########
@@ -251,7 +169,33 @@ add_attachments(SourceDb, NumAtts, [{DocId, NumConflicts}
| Rest]) ->
[],
SourceDocs
),
- {ok, UpdateResults} = couch_db:update_docs(SourceDb, NewDocs, []),
+ {ok, UpdateResults} = fabric:update_docs(SourceDb, NewDocs, [?ADMIN_CTX]),
NewRevs = [R || {ok, R} <- UpdateResults],
?assertEqual(length(NewDocs), length(NewRevs)),
add_attachments(SourceDb, NumAtts, Rest).
+
+make_att(Id, Pos, Rev, Size) ->
+ AttData = crypto:strong_rand_bytes(Size),
Review Comment:
It's a 100 bytes only. Sometimes we just want it be incompressible so
random-like is enough. But given the small size and only one line of code it
probably doesn't make too much difference.
```
4> element(1, timer:tc(fun() -> [crypto:strong_rand_bytes(100) || _ <-
lists:seq(1,1000000)], ok end)) / 1000000.0.
3.021024
```
3 microseconds
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]