loggertest

package
v0.0.0-...-d1273b2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	// Factory returns a function which constructs loggers for the container
	// specified in info. Each call to the returned function must yield a
	// distinct logger instance which can read back logs written by earlier
	// instances.
	Factory func(*testing.T, logger.Info) func(*testing.T) logger.Logger
}

Reader tests that a logger.LogReader implementation behaves as it should.

func (Reader) TestConcurrent

func (tr Reader) TestConcurrent(t *testing.T)

TestConcurrent tests the Logger and its LogReader implementation for race conditions when logging from multiple goroutines concurrently.

func (Reader) TestFollow

func (tr Reader) TestFollow(t *testing.T)

TestFollow tests the LogReader's follow implementation.

The LogReader is expected to be able to follow an arbitrary number of messages at a high rate with no dropped messages.

func (Reader) TestTail

func (tr Reader) TestTail(t *testing.T)

TestTail tests the behavior of the LogReader's tail implementation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL