From c23174979f2090db24efa32b6b593b4bf695d006 Mon Sep 17 00:00:00 2001 From: tamirms Date: Fri, 28 Jun 2024 13:03:30 +0100 Subject: [PATCH] Update stellar/go dep to fix testLogWriter (#235) --- .../integrationtest/infrastructure/test.go | 21 ++----------------- go.mod | 2 +- go.sum | 2 ++ 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/cmd/soroban-rpc/internal/integrationtest/infrastructure/test.go b/cmd/soroban-rpc/internal/integrationtest/infrastructure/test.go index c839a553..25e0fa4b 100644 --- a/cmd/soroban-rpc/internal/integrationtest/infrastructure/test.go +++ b/cmd/soroban-rpc/internal/integrationtest/infrastructure/test.go @@ -398,32 +398,15 @@ func (i *Test) generateRPCConfigFile(rpcConfig rpcConfig) { func newTestLogWriter(t *testing.T, prefix string) *testLogWriter { tw := &testLogWriter{t: t, prefix: prefix} - t.Cleanup(func() { - tw.testDoneMx.Lock() - tw.testDone = true - tw.testDoneMx.Unlock() - }) return tw } type testLogWriter struct { - t *testing.T - prefix string - testDoneMx sync.RWMutex - testDone bool + t *testing.T + prefix string } func (tw *testLogWriter) Write(p []byte) (n int, err error) { - tw.testDoneMx.RLock() - if tw.testDone { - // Workaround for https://github.com/stellar/go/issues/5342 - // and https://github.com/stellar/go/issues/5350, which causes a race condition - // in test logging - // TODO: remove once the tickets are fixed - tw.testDoneMx.RUnlock() - return len(p), nil - } - tw.testDoneMx.RUnlock() all := strings.TrimSpace(string(p)) lines := strings.Split(all, "\n") for _, l := range lines { diff --git a/go.mod b/go.mod index 5317d150..c604919d 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 - github.com/stellar/go v0.0.0-20240617183518-100dc4fa6043 + github.com/stellar/go v0.0.0-20240628063057-b589529f102f github.com/stretchr/testify v1.9.0 ) diff --git a/go.sum b/go.sum index 2a6e1022..ac3ba4e5 100644 --- a/go.sum +++ b/go.sum @@ -342,6 +342,8 @@ github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI= github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI= github.com/stellar/go v0.0.0-20240617183518-100dc4fa6043 h1:5UQzsvt9VtD3ijpzPtdW0/lXWCNgDs6GzmLUE8ZuWfk= github.com/stellar/go v0.0.0-20240617183518-100dc4fa6043/go.mod h1:TuXKLL7WViqwrvpWno2I4UYGn2Ny9KZld1jUIN6fnK8= +github.com/stellar/go v0.0.0-20240628063057-b589529f102f h1:3W9JZJ0r87wy2M3wsACuJtKW/cNWXpfw5Jwyt89Am30= +github.com/stellar/go v0.0.0-20240628063057-b589529f102f/go.mod h1:4cVjIVyU8V1iSBEMGd41j22DAyBoz2SVL5TcrJPqePU= github.com/stellar/go-xdr v0.0.0-20231122183749-b53fb00bcac2 h1:OzCVd0SV5qE3ZcDeSFCmOWLZfEWZ3Oe8KtmSOYKEVWE= github.com/stellar/go-xdr v0.0.0-20231122183749-b53fb00bcac2/go.mod h1:yoxyU/M8nl9LKeWIoBrbDPQ7Cy+4jxRcWcOayZ4BMps= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=