Skip to content

Commit 7796bc8

Browse files
committed
Increase the number of fuzzy test and benchmark samples
1 parent b68a1c1 commit 7796bc8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

patch_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ var _ = Describe("JSONPatch", func() {
359359
Ω(err).ShouldNot(HaveOccurred())
360360
})
361361

362-
for i := 0; i < 10; i++ {
362+
for i := 0; i < 100; i++ {
363363
It("fuzzy "+strconv.Itoa(i), func() {
364364
testPatch(modified, current)
365365
})
@@ -371,13 +371,13 @@ var _ = Describe("JSONPatch", func() {
371371
modifiedJSON, err := json.Marshal(modified)
372372
Ω(err).ShouldNot(HaveOccurred())
373373

374-
var bytes []byte
374+
var bytes jsonpatch.Patch
375375
var changes int
376376
_ = b.Time("runtime", func() {
377377
bytes, changes, err = jsonpatch.CreateJSONPatch(modified, current)
378378
})
379379
Ω(err).ShouldNot(HaveOccurred())
380-
if string(bytes) == "" {
380+
if bytes.Empty() {
381381
Ω(currentJSON).Should(MatchJSON(modifiedJSON))
382382
Ω(changes).Should(Equal(0))
383383
return
@@ -388,7 +388,7 @@ var _ = Describe("JSONPatch", func() {
388388
patchedJSON, err := jsonPatch.Apply(currentJSON)
389389
Ω(err).ShouldNot(HaveOccurred())
390390
Ω(patchedJSON).Should(MatchJSON(modifiedJSON))
391-
}, 10)
391+
}, 100)
392392
})
393393
})
394394

0 commit comments

Comments
 (0)