go.temporal.io/server/temporaltest/options.go

52 LOC · 18 covered · 34 uncovered · 5 ranges · 24 concepts · 4 introducers · 7 tests

File neighbourhood

The centred file is linked to every concept that introduces one of its ranges, every test that runs code from the file, and the gray connector concepts standing between those tests and the file's own introducer concepts. Undirected links join concepts to every file where they introduce source and concepts to the tests they introduce; arrows show specialization between the displayed concepts and bridge only concepts omitted from this view. Concept colors match the source ranges below; connector concepts have no source color and are shown in gray.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the file

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the related-file, concept, and source links on this page.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the filego.temporal.io/server/common/authorization/default_authorizer.go · 77 LOCauthorization/default_au…go.temporal.io/server/common/log/noop_logger.go · 25 LOClog/noop_logger.gogo.temporal.io/server/common/nexus/endpoint_registry.go · 443 LOCnexus/endpoint_registry.…go.temporal.io/server/common/persistence/sql/common.go · 137 LOCsql/common.gogo.temporal.io/server/common/primitives/timestamp/duration.go · 88 LOCtimestamp/duration.gogo.temporal.io/server/common/rpc/interceptor/telemetry.go · 412 LOCinterceptor/telemetry.gogo.temporal.io/server/common/searchattribute/mapper.go · 243 LOCsearchattribute/mapper.g…go.temporal.io/server/schema/sqlite/setup.go · 200 LOCsqlite/setup.gogo.temporal.io/server/service/frontend/fx.go · 1057 LOCfrontend/fx.gogo.temporal.io/server/service/frontend/service.go · 568 LOCfrontend/service.gogo.temporal.io/server/service/history/queues/queue_scheduled.go · 301 LOCqueues/queue_scheduled.g…go.temporal.io/server/service/matching/db.go · 995 LOCmatching/db.gogo.temporal.io/server/service/worker/scanner/scanner.go · 342 LOCscanner/scanner.gogo.temporal.io/server/service/worker/service.go · 402 LOCworker/service.gogo.temporal.io/server/service/worker/worker.go · 116 LOCworker/worker.gogo.temporal.io/server/temporal/server_option.go · 227 LOCtemporal/server_option.g…go.temporal.io/server/temporaltest/internal/lite_server.go · 375 LOCinternal/lite_server.gogo.temporal.io/server/temporaltest/server.go · 172 LOCtemporaltest/server.goworkflow_handler.go ×11 · 117 introduced LOCworkflow_handler.go ×11common.go ×1 · 11 introduced LOCcommon.go ×1request_response.pb.go ×6 · 246 introduced LOCrequest_response.pb.go ×…visibility_store.go ×17 · 171 introduced LOCvisibility_store.go ×17telemetry.go ×2 · 15 introduced LOCtelemetry.go ×2TestNewServer · 0 introduced LOCTestNewServerpri_matcher.go ×1 · 2 introduced LOCpri_matcher.go ×1timer_queue_active_task_executor.go ×1 · 3 introduced LOCtimer_queue_active_task_…workflow_task_completed_handler.go ×9 · 75 introduced LOCworkflow_task_completed_…pri_forwarder.go ×2 · 4 introduced LOCpri_forwarder.go ×2request_response.pb.go ×1 · 7 introduced LOCrequest_response.pb.go ×…logger.go ×1 · 5 introduced LOClogger.go ×1logger.go ×1 · 2 introduced LOClogger.go ×1pri_matcher.go ×1 · 4 introduced LOCpri_matcher.go ×1workflow_handler.go ×8 · 144 introduced LOCworkflow_handler.go ×8pri_matcher.go ×1 · 2 introduced LOCpri_matcher.go ×1handler.go ×1 · 20 introduced LOChandler.go ×1pri_matcher.go ×8 · 55 introduced LOCpri_matcher.go ×8matching_engine.go ×1 · 8 introduced LOCmatching_engine.go ×1server.go ×1 · 3 introduced LOCserver.go ×1logger.go ×2 · 21 introduced LOClogger.go ×2endpoint_registry.go ×2 · 26 introduced LOCendpoint_registry.go ×2server.go ×3 · 13 introduced LOCserver.go ×3lite_server.go ×25 · 303 introduced LOClite_server.go ×25ExampleNewServer · introduced test · go.temporal.io/server/temporaltest/ExampleNewServerExampleNewServerTestBaseServerOptions · introduced test · go.temporal.io/server/temporaltest/TestBaseServerOptionsTestBaseServerOptionsTestClientWithCustomInterceptor · introduced test · go.temporal.io/server/temporaltest/TestClientWithCustomInterceptorTestClientWithCustomInte…TestDefaultWorkerOptions · introduced test · go.temporal.io/server/temporaltest/TestDefaultWorkerOptionsTestDefaultWorkerOptionsTestNewServer · introduced test · go.temporal.io/server/temporaltest/TestNewServerTestNewServerTestNewWorkerWithOptions · introduced test · go.temporal.io/server/temporaltest/TestNewWorkerWithOptionsTestNewWorkerWithOptionsTestSearchAttributeRegistration · introduced test · go.temporal.io/server/temporaltest/TestSearchAttributeRegistrationTestSearchAttributeRegis…Focused file · go.temporal.io/server/temporaltest/options.go · 52 LOCtemporaltest/options.go

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the related-file, concept, and source links on this page while the interactive map is unavailable.

1 package temporaltest
2
3 import (
4 "testing"
5
6 "go.temporal.io/sdk/client"
7 "go.temporal.io/sdk/worker"
8 "go.temporal.io/server/temporal"
9 )
10
11 type TestServerOption interface {
12 apply(*TestServer)
13 }
14
15 type applyFunc func(*TestServer)
16
17 > func (f applyFunc) apply(s *TestServer) { f(s) } lite_server.go ×25
18
19 // WithT directs all worker and client logs to the test logger.
20 //
21 // If this option is specified, then server will automatically be stopped when the
22 // test completes.
23 > func WithT(t *testing.T) TestServerOption { lite_server.go ×25
24 > return applyFunc(func(server *TestServer) {
25 > server.t = t
26 > })
27 }
28
29 // WithBaseClientOptions configures options for the default clients and workers connected to the test server.
30 > func WithBaseClientOptions(o client.Options) TestServerOption { telemetry.go ×2
31 > return applyFunc(func(server *TestServer) {
32 > server.defaultClientOptions = o
33 > })
34 }
35
36 // WithBaseWorkerOptions configures default options for workers connected to the test server.
37 //
38 // WorkflowPanicPolicy is always set to worker.FailWorkflow so that workflow executions
39 // fail fast when workflow code panics or detects non-determinism.
40 > func WithBaseWorkerOptions(o worker.Options) TestServerOption { common.go ×1
41 > o.WorkflowPanicPolicy = worker.FailWorkflow
42 > return applyFunc(func(server *TestServer) {
43 > server.defaultWorkerOptions = o
44 > })
45 }
46
47 // WithBaseServerOptions enables configuring additional server options not directly exposed via temporaltest.
48 > func WithBaseServerOptions(options ...temporal.ServerOption) TestServerOption { endpoint_registry.go ×2
49 > return applyFunc(func(server *TestServer) {
50 > server.serverOptions = append(server.serverOptions, options...)
51 > })
52 }