diff options
author | Valery Piashchynski <[email protected]> | 2020-12-16 19:14:17 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-12-16 19:14:17 +0300 |
commit | a4fde7e41cbb6562ead562402c3f5f2d0cef7b62 (patch) | |
tree | 879b62045d40e757aff961193270067d5875c29a | |
parent | 0a45929b42ffedc0d45a0ff78682b400af16ef24 (diff) |
Update comments
-rw-r--r-- | plugins/reload/tests/reload_plugin_test.go | 59 |
1 files changed, 1 insertions, 58 deletions
diff --git a/plugins/reload/tests/reload_plugin_test.go b/plugins/reload/tests/reload_plugin_test.go index a099b727..6656b78c 100644 --- a/plugins/reload/tests/reload_plugin_test.go +++ b/plugins/reload/tests/reload_plugin_test.go @@ -13,7 +13,7 @@ import ( "syscall" "testing" "time" - + "github.com/spiral/endure" "github.com/spiral/errors" "github.com/spiral/roadrunner/v2/plugins/config" @@ -47,17 +47,6 @@ func TestReloadInit(t *testing.T) { assert.NoError(t, freeResources(testDir)) }() - //controller := gomock.NewController(t) - //mockLogger := mocks.NewMockLogger(controller) - // - //mockLogger.EXPECT().Debug("http handler response received", "elapsed", gomock.Any(), "remote address", "127.0.0.1").Times(1) - //mockLogger.EXPECT().Debug("file was created", "path", gomock.Any(), "name", "file.txt", "size", gomock.Any()).Times(2) - //mockLogger.EXPECT().Debug("file was added to watcher", "path", gomock.Any(), "name", "file.txt", "size", gomock.Any()).Times(2) - //mockLogger.EXPECT().Info("HTTP plugin got restart request. Restarting...").Times(1) - //mockLogger.EXPECT().Info("HTTP workers Pool successfully restarted").Times(1) - //mockLogger.EXPECT().Info("HTTP listeners successfully re-added").Times(1) - //mockLogger.EXPECT().Info("HTTP plugin successfully restarted").Times(1) - err = cont.RegisterAll( cfg, &logger.ZapLogger{}, @@ -145,20 +134,6 @@ func TestReloadHugeNumberOfFiles(t *testing.T) { assert.NoError(t, freeResources(testCopyToDir)) }() - //controller := gomock.NewController(t) - //mockLogger := mocks.NewMockLogger(controller) - // - //mockLogger.EXPECT().Debug("file added to the list of removed files", "path", gomock.Any(), "name", gomock.Any(), "size", gomock.Any()).AnyTimes() - //mockLogger.EXPECT().Debug("http handler response received", "elapsed", gomock.Any(), "remote address", "127.0.0.1").Times(1) - //mockLogger.EXPECT().Debug("file was created", "path", gomock.Any(), "name", gomock.Any(), "size", gomock.Any()).MinTimes(1) - //mockLogger.EXPECT().Debug("file was updated", "path", gomock.Any(), "name", gomock.Any(), "size", gomock.Any()).MinTimes(1) - //mockLogger.EXPECT().Debug("file was added to watcher", "path", gomock.Any(), "name", gomock.Any(), "size", gomock.Any()).MinTimes(1) - //mockLogger.EXPECT().Debug("file was removed from watcher", "path", gomock.Any(), "name", gomock.Any(), "size", gomock.Any()).MinTimes(1) - //mockLogger.EXPECT().Info("HTTP plugin got restart request. Restarting...").MinTimes(1) - //mockLogger.EXPECT().Info("HTTP workers Pool successfully restarted").MinTimes(1) - //mockLogger.EXPECT().Info("HTTP listeners successfully re-added").MinTimes(1) - //mockLogger.EXPECT().Info("HTTP plugin successfully restarted").MinTimes(1) - err = cont.RegisterAll( cfg, &logger.ZapLogger{}, @@ -261,18 +236,6 @@ func TestReloadFilterFileExt(t *testing.T) { assert.NoError(t, freeResources(testDir)) }() - //controller := gomock.NewController(t) - //mockLogger := mocks.NewMockLogger(controller) - // - //mockLogger.EXPECT().Debug("http handler response received", "elapsed", gomock.Any(), "remote address", "127.0.0.1").Times(1) - //mockLogger.EXPECT().Debug("file was created", "path", gomock.Any(), "name", gomock.Any(), "size", gomock.Any()).MinTimes(100) - //mockLogger.EXPECT().Debug("file was added to watcher", "path", gomock.Any(), "name", gomock.Any(), "size", gomock.Any()).MinTimes(1) - //mockLogger.EXPECT().Debug("file added to the list of removed files", "path", gomock.Any(), "name", gomock.Any(), "size", gomock.Any()).AnyTimes() - //mockLogger.EXPECT().Info("HTTP plugin got restart request. Restarting...").Times(1) - //mockLogger.EXPECT().Info("HTTP workers Pool successfully restarted").Times(1) - //mockLogger.EXPECT().Info("HTTP listeners successfully re-added").Times(1) - //mockLogger.EXPECT().Info("HTTP plugin successfully restarted").Times(1) - err = cont.RegisterAll( cfg, &logger.ZapLogger{}, @@ -399,20 +362,6 @@ func TestReloadCopy3k(t *testing.T) { assert.NoError(t, freeResources("dir1")) }() - //controller := gomock.NewController(t) - //mockLogger := mocks.NewMockLogger(controller) - //// - //mockLogger.EXPECT().Debug("http handler response received", "elapsed", gomock.Any(), "remote address", "127.0.0.1").Times(1) - //mockLogger.EXPECT().Debug("file was created", "path", gomock.Any(), "name", gomock.Any(), "size", gomock.Any()).MinTimes(50) - //mockLogger.EXPECT().Debug("file was added to watcher", "path", gomock.Any(), "name", gomock.Any(), "size", gomock.Any()).MinTimes(50) - //mockLogger.EXPECT().Debug("file added to the list of removed files", "path", gomock.Any(), "name", gomock.Any(), "size", gomock.Any()).MinTimes(50) - //mockLogger.EXPECT().Debug("file was removed from watcher", "path", gomock.Any(), "name", gomock.Any(), "size", gomock.Any()).MinTimes(50) - //mockLogger.EXPECT().Debug("file was updated", "path", gomock.Any(), "name", gomock.Any(), "size", gomock.Any()).MinTimes(50) - //mockLogger.EXPECT().Info("HTTP plugin got restart request. Restarting...").MinTimes(1) - //mockLogger.EXPECT().Info("HTTP workers Pool successfully restarted").MinTimes(1) - //mockLogger.EXPECT().Info("HTTP listeners successfully re-added").MinTimes(1) - //mockLogger.EXPECT().Info("HTTP plugin successfully restarted").MinTimes(1) - err = cont.RegisterAll( cfg, &logger.ZapLogger{}, @@ -694,12 +643,6 @@ func TestReloadNoRecursion(t *testing.T) { assert.NoError(t, freeResources("dir1")) }() - //controller := gomock.NewController(t) - //mockLogger := mocks.NewMockLogger(controller) - // - //http server should not be restarted. all event from wrong file extensions should be skipped - //mockLogger.EXPECT().Debug("http handler response received", "elapsed", gomock.Any(), "remote address", "127.0.0.1").Times(1) - err = cont.RegisterAll( cfg, &logger.ZapLogger{}, |