Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SetLogTB (0.26 sec)

  1. internal/logger/target/testlogger/testlogger.go

    	logger.AddSystemTarget(context.Background(), T)
    }
    
    type testLogger struct {
    	current atomic.Pointer[testing.TB]
    	action  atomic.Int32
    }
    
    // SetLogTB will set the logger to output to tb.
    // Call the returned function to disable logging.
    func (t *testLogger) SetLogTB(tb testing.TB) func() {
    	return t.setTB(tb, logMessage)
    }
    
    // SetErrorTB will set the logger to output to tb.Error.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 4K bytes
    - Viewed (0)
  2. internal/grid/grid_test.go

    	"fmt"
    	"os"
    	"runtime"
    	"strconv"
    	"strings"
    	"testing"
    	"time"
    
    	"github.com/minio/minio/internal/logger/target/testlogger"
    )
    
    func TestSingleRoundtrip(t *testing.T) {
    	defer testlogger.T.SetLogTB(t)()
    	errFatal := func(err error) {
    		t.Helper()
    		if err != nil {
    			t.Fatal(err)
    		}
    	}
    	grid, err := SetupTestGrid(2)
    	errFatal(err)
    	remoteHost := grid.Hosts[1]
    	local := grid.Managers[0]
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 08 18:15:27 GMT 2024
    - 30.1K bytes
    - Viewed (0)
  3. internal/grid/connection_test.go

    import (
    	"context"
    	"net"
    	"net/http"
    	"net/http/httptest"
    	"testing"
    	"time"
    
    	"github.com/minio/minio/internal/logger/target/testlogger"
    )
    
    func TestDisconnect(t *testing.T) {
    	defer testlogger.T.SetLogTB(t)()
    	defer timeout(10 * time.Second)()
    	hosts, listeners, _ := getHosts(2)
    	dialer := &net.Dialer{
    		Timeout: 1 * time.Second,
    	}
    	errFatal := func(err error) {
    		t.Helper()
    		if err != nil {
    			t.Fatal(err)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 6K bytes
    - Viewed (0)
Back to top