aboutsummaryrefslogtreecommitdiff
path: root/internal/net/server_test.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-15 15:35:52 -0400
committerhistoria <[not public]>2026-09-15 15:35:52 -0400
commit0b0b25222b3131ada79ff78c28eb8bf07d977deb (patch)
tree2ceaef5203595044f66a8f00064cd8e017f8f48d /internal/net/server_test.go
parent396c3facb8287b9a34076cae8f3d7b300d366d99 (diff)
downloadthehouseoficarus-0b0b25222b3131ada79ff78c28eb8bf07d977deb.tar.gz
feat: single-owner game state, transactional lifecycle, durable money on server stop
Diffstat (limited to 'internal/net/server_test.go')
-rw-r--r--internal/net/server_test.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/internal/net/server_test.go b/internal/net/server_test.go
index b106c53..c91c701 100644
--- a/internal/net/server_test.go
+++ b/internal/net/server_test.go
@@ -3,6 +3,7 @@ package net
import (
"sync"
"testing"
+ "time"
)
func TestHubConcurrency(t *testing.T) {
@@ -38,10 +39,12 @@ func TestHubConcurrency(t *testing.T) {
type testConn struct{ data []byte }
-func (c *testConn) ReadMessage() (string, error) { return "", nil }
-func (c *testConn) Write(b []byte) (int, error) { c.data = append(c.data, b...); return len(b), nil }
-func (c *testConn) Close() error { return nil }
-func (c *testConn) SetEcho(bool) error { return nil }
+func (c *testConn) ReadMessage() (string, error) { return "", nil }
+func (c *testConn) Write(b []byte) (int, error) { c.data = append(c.data, b...); return len(b), nil }
+func (c *testConn) SetWriteDeadline(time.Time) error { return nil }
+
+func (c *testConn) Close() error { return nil }
+func (c *testConn) SetEcho(bool) error { return nil }
func TestSessionWriteConcurrency(t *testing.T) {
conn := &testConn{}