File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ func CreateInMemoryTexturesStorage() *inMemoryTexturesStorage {
2828 storage := & inMemoryTexturesStorage {
2929 data : make (map [string ]* inMemoryItem ),
3030 }
31- storage .Start ()
3231
3332 return storage
3433}
Original file line number Diff line number Diff line change @@ -178,6 +178,8 @@ func TestInMemoryTexturesStorage_GarbageCollection(t *testing.T) {
178178 storage .StoreTextures ("dead24f9a4fa4877b7b04c8c6c72bb46" , textures1 )
179179 storage .StoreTextures ("b5d58475007d4f9e9ddd1403e2497579" , textures2 )
180180
181+ storage .Start ()
182+
181183 time .Sleep (inMemoryStorageGCPeriod + time .Millisecond ) // Let it start first iteration
182184
183185 _ , textures1Err := storage .GetTextures ("dead24f9a4fa4877b7b04c8c6c72bb46" )
Original file line number Diff line number Diff line change @@ -51,11 +51,13 @@ var serveCmd = &cobra.Command{
5151 return
5252 }
5353
54+ texturesStorage := queue .CreateInMemoryTexturesStorage ()
55+ texturesStorage .Start ()
5456 mojangTexturesQueue := & queue.JobsQueue {
5557 Logger : logger ,
5658 Storage : & queue.SplittedStorage {
5759 UuidsStorage : mojangUuidsRepository ,
58- TexturesStorage : queue . CreateInMemoryTexturesStorage () ,
60+ TexturesStorage : texturesStorage ,
5961 },
6062 }
6163 logger .Info ("Mojang's textures queue is successfully initialized" )
You can’t perform that action at this time.
0 commit comments