functional_test_base.go ×3

Frontier kind: Code frontier

unlabeled · c_0a6a15fcbca5

3 tests · 3142 LOC · 156 files · introduces 0 tests · 19 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges19 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
481 ranges3142 lines · 156 files · Browse complete extent
All tests (intent)
3 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

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 native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 19 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/tests/testcore/shared_cluster_t.go 10 introduced LOC · 3 ranges

Open complete file

35
36 // removeTest drops t from the active set and reports whether the set is now empty.
37 > func (s *sharedClusterT) removeTest(t testlogger.CleanupCapableT) (wasLast bool) { shared_cluster_t.go
38 > s.mu.Lock()
39 > defer s.mu.Unlock()
40 > for i, x := range s.activeTests {
41 > if x == t {
42 > s.activeTests = append(s.activeTests[:i], s.activeTests[i+1:]...)
43 > break
44 }
45 }
46 > return len(s.activeTests) == 0 shared_cluster_t.go
47 }
48
58 }
59 if len(s.activeTests) == 1 {
60 > return s.activeTests[:1] shared_cluster_t.go
61 > }
62 return nil
63 }
go.temporal.io/server/tests/testcore/functional_test_base.go 9 introduced LOC · 3 ranges

Open complete file

737 // currently running. The cluster will be torn down if t was the last active test on a poisoned cluster.
738 // The cluster pool's slot reference is replaced as soon as poison is observed.
739 > func (s *FunctionalTestBase) RegisterTest(t testlogger.CleanupCapableT) { functional_test_base.go
740 > if s.t != nil {
741 > s.t.addTest(t)
742 > }
743
744 > t.Cleanup(func() { functional_test_base.go
745 > if tl, ok := s.Logger.(*testlogger.TestLogger); ok {
746 > if f := tl.Failure(); f != nil {
747 t.Errorf("cluster poisoned by %s log: %s", f.Level, f.Msg)
748 }
749 }
750 > wasLast := s.t != nil && s.t.removeTest(t) functional_test_base.go
751 > if wasLast && s.Poisoned() {
752 if err := s.tearDownTestCluster(); err != nil {
753 t.Logf("Failed to tear down poisoned cluster: %v", err)