Created
November 11, 2019 20:59
-
-
Save dimroc/f258603a22420b259234970b53f44ebe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/internal/cltest/cltest.go b/core/internal/cltest/cltest.go | |
index 829c221e9..192686737 100644 | |
--- a/core/internal/cltest/cltest.go | |
+++ b/core/internal/cltest/cltest.go | |
@@ -142,6 +142,7 @@ type TestApplication struct { | |
wsServer *httptest.Server | |
connectedChannel chan struct{} | |
Started bool | |
+ stoppedOnce bool | |
} | |
func newWSServer() (*httptest.Server, func()) { | |
@@ -298,6 +299,10 @@ func (ta *TestApplication) Stop() error { | |
ta.t.Fatal("TestApplication Stop() called on an unstarted application") | |
} | |
+ if ta.stoppedOnce { | |
+ ta.t.Log("******** TestApplication#StoppedTWICE()") // Searching for double calls | |
+ } | |
+ ta.stoppedOnce = true | |
// TODO: Here we double close, which is less than ideal. | |
// We would prefer to invoke a method on an interface that | |
// cleans up only in test. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment