public long _2_2_AckJob_Async(Disquuun disquuun) { WaitUntil("_2_2_AckJob_Async", () => (disquuun.State() == Disquuun.ConnectionState.OPENED), 5); var queueId = Guid.NewGuid().ToString(); var jobId = DisquuunDeserializer.AddJob( disquuun.AddJob(queueId, data_10).DEPRICATED_Sync() ); var w = new Stopwatch(); w.Start(); var ackCount = 0; disquuun.AckJob(new string[] { jobId }).Async( (command, result) => { ackCount = DisquuunDeserializer.AckJob(result); w.Stop(); } ); WaitUntil("_2_2_AckJob_Async", () => (ackCount == 1), 5); return(w.ElapsedMilliseconds); }
public void _1_2_AckJob_Sync(Disquuun disquuun) { WaitUntil("_1_2_AckJob_Sync", () => (disquuun.State() == Disquuun.ConnectionState.OPENED), 5); var queueId = Guid.NewGuid().ToString(); var jobId = DisquuunDeserializer.AddJob( disquuun.AddJob(queueId, new byte[10]).DEPRICATED_Sync() ); var result = disquuun.AckJob(new string[] { jobId }).DEPRICATED_Sync(); var ackCount = DisquuunDeserializer.AckJob(result); Assert("_1_2_AckJob_Sync", 1, ackCount, "not match."); }
public void _2_2_AckJob_Async(Disquuun disquuun) { WaitUntil("_2_2_AckJob_Async", () => (disquuun.State() == Disquuun.ConnectionState.OPENED), 5); var queueId = Guid.NewGuid().ToString(); var jobId = DisquuunDeserializer.AddJob( disquuun.AddJob(queueId, new byte[10]).DEPRICATED_Sync() ); var ackCount = 0; disquuun.AckJob(new string[] { jobId }).Async( (command, result) => { ackCount = DisquuunDeserializer.AckJob(result); } ); WaitUntil("_2_2_AckJob_Async", () => (ackCount == 1), 5); }
public long _1_2_AckJob_Sync(Disquuun disquuun) { WaitUntil("_1_2_AckJob_Sync", () => (disquuun.State() == Disquuun.ConnectionState.OPENED), 5); var w = new Stopwatch(); w.Start(); var queueId = Guid.NewGuid().ToString(); var jobId = DisquuunDeserializer.AddJob( disquuun.AddJob(queueId, data_10).DEPRICATED_Sync() ); var result = disquuun.AckJob(new string[] { jobId }).DEPRICATED_Sync(); var ackCount = DisquuunDeserializer.AckJob(result); Assert("_1_2_AckJob_Sync", 1, ackCount, "not match."); w.Stop(); return(w.ElapsedMilliseconds); }