Commit 106dbc60 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent cff73a85
......@@ -141,15 +141,6 @@ func TestMasterStorage(t *testing.T) {
tracing.Unlock()
/*
defer func() {
tracing.Lock()
defer tracing.Unlock()
tctx.Done()
}()
*/
// shortcut for addresses
xaddr := func(addr string) *pipenet.Addr {
a, err := net.ParseAddr(addr)
......
......@@ -132,7 +132,20 @@ XXX should tracing provide more tight integration with runtime/pprof.Profile?
Synchronous tracing
TODO
For testing purposes it is sometimes practical to leverage the property that
probes pause original code execution until the probe run is finished. That
means while the probe is running original goroutine
- is paused at well-defined point (where trace function is called), thus
- it cannot mutate any state it is programmed to mutate.
Using this properties it is possible to attach testing probes and verify that
a set of goroutines in tested code in question
- produce events in correct order, and
- at every event associated internal state is correct.
TODO example
Cross package tracing
......
......@@ -27,6 +27,8 @@ import (
"testing"
)
// XXX move -> tracing
// TODO tests for this
// XXX Tracer interface {Trace1} ?
......@@ -70,7 +72,7 @@ func (st *SyncTracer) Get1() *SyncTraceMsg {
// XXX naming -> SyncTraceChecker
// TraceChecker synchronously collects and checks tracing events from a SyncTracer
type TraceChecker struct {
t *testing.T
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment