mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-07-12 16:43:01 +01:00
Reduce log spam in live tests.
This is slowing GitHub actions to an ABSOLUTE FUCKING GARBAGE pace (4hrs of interop for a 7 minute run)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#define TGS_WRITE_GLOBAL(Name, Value) global.##Name = ##Value
|
||||
#define TGS_PROTECT_DATUM(Path)
|
||||
#define TGS_WORLD_ANNOUNCE(message) world << ##message
|
||||
#define TGS_INFO_LOG(message) world.log << "Info: [##message]"
|
||||
#define TGS_INFO_LOG(message) TgsInfo(##message)
|
||||
#define TGS_WARNING_LOG(message) world.log << "Warn: [##message]"
|
||||
#define TGS_ERROR_LOG(message) TgsError(##message)
|
||||
#define TGS_NOTIFY_ADMINS(event)
|
||||
|
||||
@@ -54,7 +54,10 @@
|
||||
CheckBridgeLimits()
|
||||
|
||||
/world/Topic(T, Addr, Master, Keys)
|
||||
log << "Topic: [T]"
|
||||
if(findtext(T, "tgs_integration_test_tactics3") == 0)
|
||||
log << "Topic: [T]"
|
||||
else
|
||||
log << "tgs_integration_test_tactics3 <TOPIC SUPPRESSED>"
|
||||
. = HandleTopic(T)
|
||||
log << "Response: [.]"
|
||||
|
||||
@@ -210,10 +213,18 @@ var/run_bridge_test
|
||||
return response
|
||||
|
||||
var/lastTgsError
|
||||
var/suppress_bridge_spam = FALSE
|
||||
|
||||
/proc/TgsInfo(message)
|
||||
if(suppress_bridge_spam && findtext(message, "Export: http://127.0.0.1:") != 0)
|
||||
return
|
||||
world.log << "Info: [message]"
|
||||
|
||||
/proc/TgsError(message)
|
||||
world.log << "Err: [message]"
|
||||
lastTgsError = message
|
||||
if(suppress_bridge_spam && findtext(message, "Failed bridge request: http://127.0.0.1:") != 0)
|
||||
return
|
||||
world.log << "Err: [message]"
|
||||
|
||||
/proc/create_payload(size)
|
||||
var/builder = list()
|
||||
@@ -230,7 +241,9 @@ var/lastTgsError
|
||||
/proc/BridgeWithoutChunking(command, list/data)
|
||||
var/datum/tgs_api/v5/api = TGS_READ_GLOBAL(tgs)
|
||||
var/bridge_request = api.CreateBridgeRequest(command, data)
|
||||
return api.PerformBridgeRequest(bridge_request)
|
||||
suppress_bridge_spam = TRUE
|
||||
. = api.PerformBridgeRequest(bridge_request)
|
||||
suppress_bridge_spam = FALSE
|
||||
|
||||
/proc/CheckBridgeLimitsImpl()
|
||||
sleep(30)
|
||||
|
||||
@@ -519,7 +519,8 @@ namespace Tgstation.Server.Tests.Live.Instance
|
||||
TopicResponse topicRequestResult = null;
|
||||
try
|
||||
{
|
||||
topicRequestResult = await TopicClient.SendTopic(
|
||||
System.Console.WriteLine($"Topic limit test S:{payloadSize}...");
|
||||
topicRequestResult = await TopicClientNoLogger.SendTopic(
|
||||
IPAddress.Loopback,
|
||||
$"tgs_integration_test_tactics3={TopicClient.SanitizeString(JsonConvert.SerializeObject(topic, DMApiConstants.SerializerSettings))}",
|
||||
TestLiveServer.DDPort,
|
||||
@@ -883,6 +884,14 @@ namespace Tgstation.Server.Tests.Live.Instance
|
||||
DisconnectTimeout = TimeSpan.FromSeconds(30)
|
||||
}, new Logger<TopicClient>(DummyChatProvider.CreateLoggerFactoryForLogger(loggerFactory.CreateLogger("WatchdogTest.TopicClient"), out var mockLoggerFactory)));
|
||||
|
||||
public static readonly TopicClient TopicClientNoLogger = new(new SocketParameters
|
||||
{
|
||||
SendTimeout = TimeSpan.FromSeconds(30),
|
||||
ReceiveTimeout = TimeSpan.FromSeconds(30),
|
||||
ConnectTimeout = TimeSpan.FromSeconds(30),
|
||||
DisconnectTimeout = TimeSpan.FromSeconds(30)
|
||||
});
|
||||
|
||||
public async Task<DreamDaemonResponse> TellWorldToReboot(CancellationToken cancellationToken)
|
||||
{
|
||||
var daemonStatus = await instanceClient.DreamDaemon.Read(cancellationToken);
|
||||
|
||||
Reference in New Issue
Block a user