From 437cb25f872b4c7ef1f8cafd36656aefd66ea570 Mon Sep 17 00:00:00 2001 From: giongto35 Date: Sun, 19 May 2019 13:24:24 +0800 Subject: [PATCH] Update comments --- cmd/main_test.go | 4 +++- worker/room/room.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/main_test.go b/cmd/main_test.go index 8a1d0f6e..aa6c538e 100644 --- a/cmd/main_test.go +++ b/cmd/main_test.go @@ -364,9 +364,11 @@ func TestReconnectRoomNoLocal(t *testing.T) { - A server X is initialized connecting to overlord - Client A creates a room K on server X - Server X is turned down, Client is closed + - room on local is deleted - Spawn a new server and a new client connecting to the same room K Expected behavior: - - The game should be continue + - room on local storage is refetched from cloud storage + - The game should be continue where it is closed TODO: Current test just make sure the game is running, not check if the game is the same */ // This test only run if GCP storage is set diff --git a/worker/room/room.go b/worker/room/room.go index fa745b1d..7047078a 100644 --- a/worker/room/room.go +++ b/worker/room/room.go @@ -222,7 +222,7 @@ func (r *Room) SaveGame() error { // saveOnlineRoomToLocal save online room to local func (r *Room) saveOnlineRoomToLocal(roomID string, savepath string) error { - log.Println("Try loading game from cloud storage") + log.Println("Check if game is on cloud storage") // If the game is not on local server // Try to load from gcloud data, err := r.onlineStorage.LoadFile(roomID)