mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-06 12:53:44 +00:00
The dashboard's web server answers one request at a time, so converting a big .nif (glom files up to tens of MB) held up every other request, flairs included. - dWeb: Web::Defer hands a request to another thread; the reply is sent from the web thread on its next poll (DeferredQueue). A client that leaves first cancels it and the late reply is dropped. The synchronous route API is unchanged. - Web::Shutdown closes connections while the state their close events touch is still alive; the destructor no longer runs handlers during static destruction (stopping the dashboard aborted in ~WSClient). - WorkerPool: priority lanes, with one thread only for urgent work (flairs, small models, textures), and limited background work. - Scenery: mesh and texture routes (and the showcase's) convert on the pool; thread-safe memory and disk caches, one conversion per model at a time with waiters sharing it; zones are converted ahead onto the disk cache while viewed. - Setting scenery_workers (0: half the cores, 2 to 4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
78 lines
2.6 KiB
CMake
78 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"
|
|
"${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}")
|