MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / Close

Method Close

internal/testutil/contract_server.go:167–184  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

165}
166
167func (s *ContractServer) Close(ctx context.Context) error {
168 var firstErr error
169 if err := s.httpServer.Shutdown(ctx); err != nil && firstErr == nil {
170 firstErr = err
171 }
172 if err := s.httpLn.Close(); err != nil && firstErr == nil {
173 firstErr = err
174 }
175 if err := s.smtpServer.Close(); err != nil && firstErr == nil {
176 firstErr = err
177 }
178 s.WSHub.Close()
179 if err := truncateAll(ctx, s.DBPool); err != nil && firstErr == nil {
180 firstErr = err
181 }
182 s.DBPool.Close()
183 return firstErr
184}

Callers 6

TestServerFunction · 0.45
FakeSMTPServerFunction · 0.45
handleSMTPConnFunction · 0.45
OpenPreparedTestDBFunction · 0.45
TestDBFunction · 0.45
StartContractServerFunction · 0.45

Calls 1

truncateAllFunction · 0.85

Tested by 2

TestServerFunction · 0.36
TestDBFunction · 0.36