mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
Merge pull request #130437 from srivastav-abhishek/fix-unsafe-conversions-test
Removed parallel execution for test/subtest where AllocsPerRun is used
This commit is contained in:
commit
e7eb076349
@ -552,7 +552,6 @@ func withAudit(ctx context.Context) context.Context {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestUnsafeConversions(t *testing.T) {
|
func TestUnsafeConversions(t *testing.T) {
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
// needs to be large to force allocations so we pick a random value between [1024, 2048]
|
// needs to be large to force allocations so we pick a random value between [1024, 2048]
|
||||||
size := utilrand.IntnRange(1024, 2048+1)
|
size := utilrand.IntnRange(1024, 2048+1)
|
||||||
@ -574,7 +573,6 @@ func TestUnsafeConversions(t *testing.T) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
t.Run("toBytes allocations", func(t *testing.T) {
|
t.Run("toBytes allocations", func(t *testing.T) {
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
s := utilrand.String(size)
|
s := utilrand.String(size)
|
||||||
f := func() {
|
f := func() {
|
||||||
@ -606,7 +604,6 @@ func TestUnsafeConversions(t *testing.T) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
t.Run("toString allocations", func(t *testing.T) {
|
t.Run("toString allocations", func(t *testing.T) {
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
b := make([]byte, size)
|
b := make([]byte, size)
|
||||||
if _, err := rand.Read(b); err != nil {
|
if _, err := rand.Read(b); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user