Ejemplo n.º 1
0
        private static void ClusterChannel_MessageReceived(object sender, MessageReceivedEventArgs args)
        {
            if (args.Message is TestRunFinishedMessage)
            {
                lock (_sync)
                {
                    if (ActiveManagerCount == 0)
                        return;

                    if (ActiveManagerCount == 1)
                        TerminateTestrun();
                    
                    ActiveManagerCount--;
                }
            }
        }
Ejemplo n.º 2
0
        private static void ClusterChannel_MessageReceived(object sender, MessageReceivedEventArgs args)
        {
            if (args.Message is IndexBackupStartedMessage)
            {
                _indexBackupStarted = true;
                return;
            }

            var backupFinishedMessage = args.Message as IndexBackupFinishedMessage;
            if (backupFinishedMessage != null)
            {
                Console.WriteLine();
                Console.WriteLine("--------");
                Console.WriteLine("Summary:");
                //Console.WriteLine("Storing message count: " + _storingMessages);
                Console.WriteLine(backupFinishedMessage.Message);
                _indexBackupFinished = true;
                return;
            }

            var backupProgressMsg = args.Message as IndexBackupProgressMessage;
            if (backupProgressMsg != null)
            {
                DisplayProgress(backupProgressMsg);
                return;
            }

            var restoringStarteddMsg = args.Message as IndexRestoringStartedMessage;
            if (restoringStarteddMsg != null)
            {
                lock (_sync)
                {
                    _restoringInstances++;
                    _restoringMessages.Add(String.Concat("Index restoring started on ", restoringStarteddMsg.Machine, " | ", restoringStarteddMsg.InstanceId, " | ", _restoringInstances));
                }
            }
            var restoringFinishedMsg = args.Message as IndexRestoringFinishedMessage;
            if (restoringFinishedMsg != null)
            {
                lock (_sync)
                {
                    _restoredInstances++;
                    _restoredMessages.Add(String.Concat("Index restored on ", restoringFinishedMsg.Machine, " | ", restoringFinishedMsg.InstanceId, " | executing time: ", DateTime.Now - _restoreRequestSent));
                }
            }
            var errorMsg = args.Message as IndexRestoringErrorMessage;
            if (errorMsg != null)
            {
                lock (_sync)
                {
                    _restoredMessages.Add(String.Concat("Index restoring error:", CR, errorMsg.Exception.Message, CR, errorMsg.Exception.StackTrace));
                    _restoringErrors++;
                }
            }
        }
Ejemplo n.º 3
0
        void ClusterChannel_MessageReceived(object sender, MessageReceivedEventArgs args)
        {

            listView1.Invoke(new EventHandler(MessageHandler), sender, args);
        }