示例#1
0
        public static void QueueBobsBuddyTerminalCase(TestInput testInput, TestOutput output, string result, int turn, List <string> debugLog, Region region)
        {
            if (BobsBuddyEventsSent >= MaxBobsBuddyEvents)
            {
                return;
            }

            if (!Helper.IsSigned)
            {
                return;
            }

            // Clean up data
            testInput.RemoveSelfReferencesFromMinions();
            output.ClearListsForReporting();             //ignoring for some temporary debugging

            var msg = new SentryMessage($"BobsBuddy {BobsBuddyUtils.VersionString}: Incorrect Terminal Case: {result}");

            var data = new BobsBuddyData()
            {
                ShortId           = "",
                Turn              = turn,
                Result            = result,
                ThreadCount       = BobsBuddyInvoker.ThreadCount,
                Iterations        = output.simulationCount,
                ExitCondition     = output.myExitCondition.ToString(),
                Input             = testInput,
                Output            = output,
                Log               = ReverseAndClone(debugLog),
                Region            = region,
                CanRemoveLichKing = BobsBuddyInvoker.CanRemoveLichKing
            };

            var bbEvent = new SentryEvent(msg)
            {
                Level = ErrorLevel.Warning,
                Extra = data,
            };

            bbEvent.Tags.Add("region", data.Region.ToString());

            bbEvent.Fingerprint.Add(result);
            bbEvent.Fingerprint.Add(BobsBuddyUtils.VersionString);

            BobsBuddyEvents.Enqueue(bbEvent);
        }