Supertester.IsolationContext (Supertester v0.6.0)

Copy Markdown View Source

Normalized representation of all resources and metadata tracked for a test.

Summary

Functions

Get the isolated ETS table for a source table name.

Check if logger isolation is active.

List all telemetry handler IDs.

Get the telemetry test ID for filtering.

Types

process_info()

@type process_info() :: %{pid: pid(), name: term() | nil, module: module()}

t()

@type t() :: %Supertester.IsolationContext{
  cleanup_callbacks: [(-> any())],
  ets_injections: [{module(), atom(), term(), term()}],
  ets_mirrors: [{atom(), :ets.tid() | atom()}],
  ets_tables: [term()],
  initial_ets_tables: [term()],
  initial_processes: [pid()],
  isolated_ets_tables: %{required(atom()) => :ets.tid() | atom()},
  logger_isolated?: boolean(),
  logger_original_level: Logger.level() | nil,
  processes: [process_info()],
  registry: term() | nil,
  tags: map(),
  telemetry_handlers: [{String.t(), [[atom()]]}],
  telemetry_test_id: integer() | nil,
  test_id: term()
}

Functions

get_ets_table(isolation_context, source_name)

@spec get_ets_table(t(), atom()) :: :ets.tid() | atom() | nil

Get the isolated ETS table for a source table name.

logger_isolated?(isolation_context)

@spec logger_isolated?(t()) :: boolean()

Check if logger isolation is active.

telemetry_handlers(isolation_context)

@spec telemetry_handlers(t()) :: [String.t()]

List all telemetry handler IDs.

telemetry_id(isolation_context)

@spec telemetry_id(t()) :: integer() | nil

Get the telemetry test ID for filtering.