tests

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License.

Index

Constants

View Source
const (
	EventBalanceTest log.Event = "balance.test"
)

Variables

This section is empty.

Functions

func BalanceTester

func BalanceTester(ctx context.Context) error

BalanceTester checks that we can properly distribute partitions and maintain it over time.

func BatchStressTester

func BatchStressTester(ctx context.Context) error

BatchStressTester sends a limited number of events and then consumes that set of events over and over to see what we get with different wait times.

func MultiBalanceTester

func MultiBalanceTester(ctx context.Context) error

MultiBalanceTester runs the BalanceTest multiple times against different combinations of partition acquisition strategy and number of processors.

NOTE: this test assumes that the Event Hub you're using has 32 partitions.

func ProcessorStressTester

func ProcessorStressTester(ctx context.Context) error

Types

type Event

type Event string
const (
	EventUnbalanced Event = "Unbalanced"
	EventBalanced   Event = "Balanced"
	EventEnd        Event = "end"
	EventStart      Event = "start"
)

type Metric

type Metric string
const (
	// standard to all tests
	MetricNameSent          Metric = "Sent"
	MetricNameReceived      Metric = "Received"
	MetricNameOwnershipLost Metric = "OwnershipLost"

	// go specific
	MetricDeadlineExceeded Metric = "DeadlineExceeded"
)

Jump to

Keyboard shortcuts

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