public override void Entry4Subscriber(string name, string data) { string d = (string)data; if (name == "Test1Pub1") { if (pubCount < TestUt.pubData.Count) { Logging.logger.Info(this.GetType().ToString() + " SubData: " + d); if (d != TestUt.pubData[pubCount]) { PubErr++; } pubCount++; } else { TestUt.SetTestRlt(PubErr); } } else if (name == "Test3Pub1") { if (SubPubCount < TestUt.pubData.Count) { Logging.logger.Info(this.GetType().ToString() + " SubPubData: " + d); if (d != TestUt.pubData[SubPubCount]) { SubPubErr++; } SubPubCount++; } else { TestUt.SetSubPubRlt(SubPubErr); } } else if (name == "Test3Pub2") { if (FaninPubCount < TestUt.pubData.Count) { Logging.logger.Info(this.GetType().ToString() + " SubPubData: " + d); if (d != TestUt.pubData[FaninPubCount]) { FaninPubErr++; } FaninPubCount++; } else { TestUt.SetSubPubRlt(FaninPubErr); } } }
public override void Entry4FanInData(string name, string data) { string d = (string)data; if (name == "Fanins1") { if (FaninsCnt < TestUt.reqData.Count) { Logging.logger.Info("Entry4FanInData " + name + " " + d); if (d == TestUt.reqData[FaninsCnt]) { } else { FaninsErr++; } FaninsCnt++; } else { TestUt.SetTestRlt(FaninsErr); } } else if (name == "Fanins2") { if (FanworkCnt < TestUt.resData.Count) { Logging.logger.Info("Entry4FanInData " + name + " " + d); if (d == TestUt.resData[FanworkCnt]) { } else { FanworkErr++; } FanworkCnt++; } else { TestUt.SetTestRlt(FanworkErr); } } }
public override void Entry4UserTask(string name) { int err = 0; int rlt = 0; if (name == "UserFaninc") { #region while (true) { if (FaninsTest) { err = 0; foreach (string s in TestUt.reqData) { rlt = this.FaninClientSendData("Fanins1", s); if (rlt != 0) { err++; } else { Logging.logger.Info("Entry4UserTask UserFaninc send " + s + " "); } } break; } else { Thread.Sleep(100); } } TestUt.SetTestRlt(err); #endregion } else if (name == "UserFaninPub") { #region while (true) { if (FaninPubTest) { err = 0; foreach (string s in TestUt.pubData) { rlt = this.FaninClientSendData("Test3Faninpub", s); if (rlt != 0) { err++; } else { Logging.logger.Info("Entry4UserTask UserFaninpubc send " + s + " "); } } break; } else { Thread.Sleep(100); } } TestUt.SetTestRlt(err); #endregion } else if (name == "Fifoc") { #region while (true) { if (FifoTest) { err = 0; foreach (string s in TestUt.pubData) { rlt = this.FaninClientSendData("Test3Fi", s); if (rlt != 0) { err++; } else { Logging.logger.Info("Entry4UserTask Fifoc send " + s + " "); } } break; } else { Thread.Sleep(100); } } #endregion } }
public override void Entry4UserTask(string name) { int i = 0; int err = 0; if (name == "Usert") { #region while (true) { if (ReqResTest) { err = 0; foreach (string s in TestUt.reqData) { string os = string.Empty; this.RequestGetData("Res1", s, out os); Logging.logger.Info(s + " " + os); if (os != TestUt.resData[i]) { err++; } i++; } TestUt.SetTestRlt(err); break; } else { Thread.Sleep(100); } } TestUt.SetTestRlt(err); #endregion } else if (name == "FanoutC") { #region i = 0; err = 0; while (i < TestUt.resData.Count) { string od = string.Empty; this.FanOutClientGetData("Fanout1", out od); Logging.logger.Info("FanoutC Fanout1 " + od); if (od != TestUt.resData[i]) { err++; } i++; } TestUt.SetTestRlt(err); #endregion } else if (name == "FifoC") { #region i = 0; err = 0; while (i < TestUt.pubData.Count) { string od = string.Empty; this.FanOutClientGetData("Test3Fo", out od); Logging.logger.Info("FifoC Test3Fo " + od); if (od != TestUt.pubData[i]) { err++; } i++; } TestUt.SetTestRlt(err); #endregion } }