mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-08 13:53:45 +00:00
Opening a zone the first time built its terrain, scene objects and manifests and ran ImageMagick on the web thread, stalling the dashboard for seconds. - Workers: the shared pool plus Workers::Reply (answer at once when built, else from a worker via Web::Defer). - terrain_chunks/terrain_layers/scene/paths/scenery/flairs (world3d, property and showcase routes) and terrain textures go through it; results are built once in OnceCaches, the .raw is read once per zone for chunks, layers and flairs, deflated bodies are cached thread-safely. - ImageMagick conversions are deduplicated and written under a temporary name. - Workers don't query the CDClient, read settings or call mongoose: ZoneTable, render components, flairs, object names, LOT kinds and terrain texture names are read at startup; client_location is read once; base64 is plain C++. - Logger writes one line at a time (mutex; localtime's buffer is shared). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
79 lines
2.6 KiB
CMake
79 lines
2.6 KiB
CMake
set(DWEBTESTS_SOURCES
|
|
"MiddlewareTests.cpp"
|
|
"RouteIntegrationTests.cpp"
|
|
"ServerStateTests.cpp"
|
|
"AccountActionTests.cpp"
|
|
"RouteUtilsTests.cpp"
|
|
"JWTTests.cpp"
|
|
"RequireAuthMiddlewareTests.cpp"
|
|
"WebTestDependencies.cpp"
|
|
"PlayerActionTests.cpp"
|
|
"SmtpTests.cpp"
|
|
"OAuth2Tests.cpp"
|
|
"EconomyReportTests.cpp"
|
|
"ItemTraceTests.cpp"
|
|
"CronTests.cpp"
|
|
"PermissionsTests.cpp"
|
|
"SettingsCatalogTests.cpp"
|
|
"BehaviorXmlTests.cpp"
|
|
"CharacterXmlTests.cpp"
|
|
"CharacterRestoreTests.cpp"
|
|
"ZonePathsTests.cpp"
|
|
"RawTerrainTests.cpp"
|
|
"LevelObjectsTests.cpp"
|
|
"GameLabelsTests.cpp"
|
|
"VanityJsonTests.cpp"
|
|
"OpenApiTests.cpp"
|
|
"MessageInspectorTests.cpp"
|
|
"CDClientSchemaTests.cpp"
|
|
"ServerOperationsTests.cpp"
|
|
"PublicPagesTests.cpp"
|
|
"ModerationToolsTests.cpp"
|
|
"ModeratorHelperTests.cpp"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/ai/ClaudeClient.cpp"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/ai/ModeratorPrompt.cpp"
|
|
"WorldViewTests.cpp"
|
|
"NifFileTests.cpp"
|
|
"DeferredReplyTests.cpp"
|
|
"WorkerPoolTests.cpp"
|
|
"OnceCacheTests.cpp"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/routes/WorkerPool.cpp"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/routes/NifFile.cpp"
|
|
"BackupFilesTests.cpp"
|
|
"SecurityFixesTests.cpp"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/routes/BackupFiles.cpp"
|
|
"MetricsFormatTests.cpp"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/routes/SettingsCatalog.cpp"
|
|
"AlertsAndTwoFactorTests.cpp"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/auth/Totp.cpp"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/notify/WebhookFormat.cpp"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/email/OAuth2.cpp"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/email/SmtpClient.cpp"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/auth/JWTUtils.cpp"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/auth/RequireAuthMiddleware.cpp"
|
|
)
|
|
|
|
add_executable(dWebTests ${DWEBTESTS_SOURCES})
|
|
|
|
target_include_directories(dWebTests PRIVATE
|
|
"${PROJECT_SOURCE_DIR}/dCommon"
|
|
"${PROJECT_SOURCE_DIR}/dCommon/dClient"
|
|
"${PROJECT_SOURCE_DIR}/dWeb"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/auth"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/routes"
|
|
"${PROJECT_SOURCE_DIR}/dChatFilter"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/email"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/notify"
|
|
"${PROJECT_SOURCE_DIR}/dDashboardServer/ai"
|
|
"${PROJECT_SOURCE_DIR}/dDatabase/GameDatabase/ITables"
|
|
"${PROJECT_SOURCE_DIR}/dNet"
|
|
"${PROJECT_SOURCE_DIR}/thirdparty/nlohmann"
|
|
)
|
|
|
|
target_link_libraries(dWebTests ${COMMON_LIBRARIES} dWeb sqlite3 OpenSSL::Crypto CURL::libcurl GTest::gtest_main)
|
|
|
|
gtest_discover_tests(dWebTests)
|
|
|
|
target_compile_definitions(dWebTests PRIVATE DLU_SOURCE_DIR="${PROJECT_SOURCE_DIR}")
|