Skip to content

Commit

Permalink
Merge pull request #9955 from tvegas1/go_serialized
Browse files Browse the repository at this point in the history
GO/TESTS: Use serialized thread mode
  • Loading branch information
brminich authored Jun 17, 2024
2 parents 46fcc4b + 16ccaaf commit 0bda7b9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions bindings/go/src/ucx/ucs_constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ import "C"
type UcsThreadMode int

const (
UCS_THREAD_MODE_SINGLE UcsThreadMode = C.UCS_THREAD_MODE_SINGLE
UCS_THREAD_MODE_MULTI UcsThreadMode = C.UCS_THREAD_MODE_MULTI
UCS_THREAD_MODE_SINGLE UcsThreadMode = C.UCS_THREAD_MODE_SINGLE
UCS_THREAD_MODE_SERIALIZED UcsThreadMode = C.UCS_THREAD_MODE_SERIALIZED
UCS_THREAD_MODE_MULTI UcsThreadMode = C.UCS_THREAD_MODE_MULTI
)

type UcsMemoryType int
Expand Down
2 changes: 1 addition & 1 deletion bindings/go/tests/endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func TestUcpEpTag(t *testing.T) {
receiver := prepareContext(t, nil)
t.Logf("Testing tag %v -> %v", memType.senderMemType, memType.recvMemType)

ucpWorkerParams := (&UcpWorkerParams{}).SetThreadMode(UCS_THREAD_MODE_SINGLE)
ucpWorkerParams := (&UcpWorkerParams{}).SetThreadMode(UCS_THREAD_MODE_SERIALIZED)
ucpWorkerParams.WakeupTagSend().WakeupTagRecv()

receiver.worker, _ = receiver.context.NewWorker(ucpWorkerParams)
Expand Down
2 changes: 1 addition & 1 deletion bindings/go/tests/listener_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestUcpListener(t *testing.T) {

ucpParams := (&UcpParams{}).EnableTag()

ucpWorkerParams := (&UcpWorkerParams{}).SetThreadMode(UCS_THREAD_MODE_SINGLE)
ucpWorkerParams := (&UcpWorkerParams{}).SetThreadMode(UCS_THREAD_MODE_SERIALIZED)

listenerParams := &UcpListenerParams{}
listenerParams.SetSocketAddress(addr)
Expand Down
2 changes: 1 addition & 1 deletion bindings/go/tests/worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestUcpWorkerEfd(t *testing.T) {
ucpContext, _ := NewUcpContext((&UcpParams{}).EnableTag().EnableWakeup())
defer ucpContext.Close()
ucpWorkerParams := &UcpWorkerParams{}
ucpWorkerParams.SetThreadMode(UCS_THREAD_MODE_SINGLE)
ucpWorkerParams.SetThreadMode(UCS_THREAD_MODE_SERIALIZED)
ucpWorkerParams.WakeupEdge()

ucpWorker, err := ucpContext.NewWorker(ucpWorkerParams)
Expand Down

0 comments on commit 0bda7b9

Please sign in to comment.