Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
Fixed tests.
Browse files Browse the repository at this point in the history
Rpc requests functioning correctly now.
  • Loading branch information
DJGosnell committed Sep 13, 2016
1 parent b5d6a8f commit d819280
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public RpcPerformanceTest(string[] args) {

RpcSingleProcessTest(10000, 4, config, RpcTestType.Return);

//RpcSingleProcessTest(10000, 4, config, RpcTestType.Exception);
RpcSingleProcessTest(10000, 4, config, RpcTestType.Exception);


}
Expand Down
6 changes: 3 additions & 3 deletions DtronixMessageQueue/Rpc/RpcProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public override IMessage Invoke(IMessage msg) {
return new ReturnMessage(null, null, 0, method_call.LogicalCallContext, method_call);
}

return_wait.ReturnResetEvent.Wait(TimeSpan.FromSeconds(1), return_wait.Token);
return_wait.ReturnResetEvent.Wait(TimeSpan.FromSeconds(100), return_wait.Token);

if (return_wait.ReturnResetEvent.IsSet == false) {
string test = "wait;";
Expand All @@ -104,8 +104,8 @@ public override IMessage Invoke(IMessage msg) {
return new ReturnMessage(return_value, null, 0, method_call.LogicalCallContext, method_call);

case RpcMessageType.RpcCallException:
var return_exception = (RpcRemoteExceptionDataContract)RuntimeTypeModel.Default.DeserializeWithLengthPrefix(store.Stream, null, typeof(RpcRemoteExceptionDataContract), PrefixStyle.Base128, 0);
return new ReturnMessage(new RpcRemoteException(return_exception), method_call);
var return_exception = RuntimeTypeModel.Default.DeserializeWithLengthPrefix(store.Stream, null, typeof(RpcRemoteExceptionDataContract), PrefixStyle.Base128, 0);
return new ReturnMessage(new RpcRemoteException((RpcRemoteExceptionDataContract)return_exception), method_call);

default:
throw new ArgumentOutOfRangeException();
Expand Down
2 changes: 1 addition & 1 deletion DtronixMessageQueue/Rpc/RpcSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private void SendRpcException(SerializationStore.Store store, Exception ex, usho

var exception = new RpcRemoteExceptionDataContract(ex is TargetInvocationException ? ex.InnerException : ex);

RuntimeTypeModel.Default.SerializeWithLengthPrefix(store.Stream, exception, exception.GetType(), PrefixStyle.Base128, 1);
RuntimeTypeModel.Default.SerializeWithLengthPrefix(store.Stream, exception, exception.GetType(), PrefixStyle.Base128, 0);

store.MessageWriter.Write(store.Stream.ToArray());

Expand Down

0 comments on commit d819280

Please sign in to comment.