counter

package
v0.1.0-dev1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterContractSuite

type CounterContractSuite struct {
	suite.Suite
	// contains filtered or unexported fields
}

CounterContractSuite defines the contract tests for the counter.Counter interface. All counter implementations must pass these tests. Implementation-specific tests should embed this suite and call SetCounter().

func (*CounterContractSuite) SetContext

func (s *CounterContractSuite) SetContext(ctx context.Context)

SetContext sets the context for tests

func (*CounterContractSuite) SetCounter

func (s *CounterContractSuite) SetCounter(c counter.Counter)

SetCounter is called by implementation tests to provide the concrete counter instance

func (*CounterContractSuite) SetLogger

func (s *CounterContractSuite) SetLogger(log *testutil.TestLogger)

SetLogger sets the logger for tests

func (*CounterContractSuite) TestCounter_Concurrency

func (s *CounterContractSuite) TestCounter_Concurrency()

TestCounter_Concurrency tests concurrent access to the same counter

func (*CounterContractSuite) TestCounter_MultipleDomains

func (s *CounterContractSuite) TestCounter_MultipleDomains()

TestCounter_MultipleDomains tests independent counters

func (*CounterContractSuite) TestCounter_Next

func (s *CounterContractSuite) TestCounter_Next()

TestCounter_Next tests getting the next sequence number

Jump to

Keyboard shortcuts

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