Skip to content

Commit

Permalink
test: Skip some test on OSX arm64
Browse files Browse the repository at this point in the history
There is a weird error running on my macbook apple silicon based where
ordering is totally different than when running on other platform (ie:
Linux).

I can't figure out why this is happening but i am guessing some bug in
the Golang compiler.

The error shows:

queue_manager_test.go:135: assertion failed: test-ns/fifth (started[0]
string) != test-ns/fourth (string)

and that randomly happen.

Signed-off-by: Chmouel Boudjnah <[email protected]>
  • Loading branch information
chmouel committed Dec 4, 2024
1 parent 8c40e2e commit faafeaa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/sync/queue_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sync

import (
"fmt"
"runtime"
"testing"
"time"

Expand All @@ -23,7 +24,16 @@ import (
rtesting "knative.dev/pkg/reconciler/testing"
)

func skipOnOSX64(t *testing.T) {
if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" {
t.Skip("Skipping test on OSX arm64")
}
}

func TestSomeoneElseSetPendingWithNoConcurrencyLimit(t *testing.T) {
// Skip if we are running on OSX, there is a problem with ordering only happening on arm64
skipOnOSX64(t)

observer, _ := zapobserver.New(zap.InfoLevel)
logger := zap.New(observer).Sugar()

Expand Down Expand Up @@ -70,6 +80,8 @@ func TestAddToPendingQueueDirectly(t *testing.T) {
}

func TestNewQueueManagerForList(t *testing.T) {
// Skip if we are running on OSX, there is a problem with ordering only happening on arm64
skipOnOSX64(t)
observer, _ := zapobserver.New(zap.InfoLevel)
logger := zap.New(observer).Sugar()

Expand Down

0 comments on commit faafeaa

Please sign in to comment.