lib/protocol: Prioritize close msg and add close timeout (#5746)

This commit is contained in:
Simon Frei
2019-06-05 08:01:59 +02:00
committed by Jakob Borg
parent 6e8aa0ec25
commit e39d3f95dd
3 changed files with 64 additions and 6 deletions

View File

@@ -3266,6 +3266,12 @@ func TestSanitizePath(t *testing.T) {
// on a protocol connection that has a blocking reader (blocking writer can't
// be done as the test requires clusterconfigs to go through).
func TestConnCloseOnRestart(t *testing.T) {
oldCloseTimeout := protocol.CloseTimeout
protocol.CloseTimeout = 100 * time.Millisecond
defer func() {
protocol.CloseTimeout = oldCloseTimeout
}()
w, fcfg := tmpDefaultWrapper()
m := setupModel(w)
defer cleanupModelAndRemoveDir(m, fcfg.Filesystem().URI())