Thread: [Quickfix-developers] Testing QuickFix with NUnit
Brought to you by:
orenmnero
From: Jeff <y2z...@sn...> - 2008-02-28 14:46:34
|
Hello Quickfix Developers, I know this issue has come up a few times in the past on this list, but there hasn't been a resolution posted yet. I am getting the following error when trying to unit test the QuickFix library using NUnit: ----snip---- An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll Additional information: Cannot pass a GCHandle across app domains. ----snip---- More information is displayed on the NUnit test screen (just before it disappears due to the above crash): ----snip---- at System.Runtime.InteropServices.GCHandle.InternalCheckDomain(Int32 handle) at System.Runtime.InteropServices.GCHandle.op_Explicit(IntPtr value) at Log.onEvent(Log*, basic_string<char,std::char_traits<char>,std::allocator<char> >* string) ----snip---- Versions: NUnit: I've tried 2.2.2, 2.4.6 (latest), 2.4.7 (development) QuickFix: 1.12.4 VS: 2003 .NET: 1.1 Anyone have any ideas how this could be solved in order to use the NUnit test environment? Thanks! Jeff |
From: Jeff <jhe...@gm...> - 2008-02-28 16:04:43
|
More information on this: This happens after calling SocketInitiator.Start() I do receive the onCreate() callback in my .NET class And I tried something else, because of this error (specifically the " Log.onEvent"): ----snip---- > at System.Runtime.InteropServices.GCHandle.InternalCheckDomain(Int32 > handle) > at System.Runtime.InteropServices.GCHandle.op_Explicit(IntPtr value) > at Log.onEvent(Log*, > basic_string<char,std::char_traits<char>,std::allocator<char> >* string) > ----snip---- I thought I'd try it creating the class without the LogFactory. That resulted in a different error: ----snip---- at System.Runtime.InteropServices.GCHandle.InternalCheckDomain(Int32 handle) at System.Runtime.InteropServices.GCHandle.op_Explicit(IntPtr value) at gcroot<QuickFix::MessageStore __gc *>.->(gcroot<QuickFix::MessageStore __gc *>* ) at MessageStore.getCreationTime(MessageStore*, UtcTimeStamp* ) ----snip---- So it appears to be a problem with the Store and Log factories. I don't believe there is a way to create the Initiator without a Store Factory, but if there is - please let me know and I'll try it without that and see if I can get any further. Thanks! Jeff |
From: Jeff <jhe...@gm...> - 2008-03-05 19:04:27
|
Anyone have any insight on this problem? Thanks, Jeff On Thu, Feb 28, 2008 at 11:00 AM, Jeff <jhe...@gm...> wrote: > > More information on this: > > This happens after calling SocketInitiator.Start() > > I do receive the onCreate() callback in my .NET class > > And I tried something else, because of this error (specifically the " > Log.onEvent"): > > ----snip---- > > at System.Runtime.InteropServices.GCHandle.InternalCheckDomain(Int32 > > handle) > > at System.Runtime.InteropServices.GCHandle.op_Explicit(IntPtr value) > > at Log.onEvent(Log*, > > basic_string<char,std::char_traits<char>,std::allocator<char> >* string) > > ----snip---- > > > I thought I'd try it creating the class without the LogFactory. That > resulted in a different error: > > ----snip---- > at System.Runtime.InteropServices.GCHandle.InternalCheckDomain(Int32 > handle) > at System.Runtime.InteropServices.GCHandle.op_Explicit(IntPtr value) > at gcroot<QuickFix::MessageStore __gc *>.->(gcroot<QuickFix::MessageStore > __gc *>* ) > at MessageStore.getCreationTime(MessageStore*, UtcTimeStamp* ) > ----snip---- > > So it appears to be a problem with the Store and Log factories. I don't > believe there is a way to create the Initiator without a Store Factory, but > if there is - please let me know and I'll try it without that and see if I > can get any further. > |
From: <Nil...@co...> - 2008-03-06 05:30:57
|
Jeff I don't think you can create initiator without message-store factory. However you can create it without log-factory. This could be because the message-store is been used for guaranteed message delivery, irrespective of TCP or UDP, as required by the FIX specifications. Cheers -NIlesh >-----Original Message----- >From: qui...@li... [mailto:quickfix- >dev...@li...] On Behalf Of Jeff >Sent: Thursday, March 06, 2008 12:34 AM >To: qui...@li... >Subject: Re: [Quickfix-developers] Testing QuickFix with NUnit > >QuickFIX Documentation: >http://www.quickfixengine.org/quickfix/doc/html/index.html >QuickFIX Support: http://www.quickfixengine.org/services.html This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. |
From: Jeff <jhe...@gm...> - 2008-03-06 13:59:15
|
Thanks for the reply! It's not so much that I want to create it without the message-store factory, I was just asking that in an attempt for more testing. The big issue is that it's not possible to test with Nunit due to the gchandle crossing app domains problem, which appears to be in the log factory and the message store factory. I suppose no one is really using NUnit to do any unit testing with this library? QuickFix developers: Are there any unnecessary gchandles being passed in the log and message store factories? Thanks! Jeff On Thu, Mar 6, 2008 at 12:30 AM, <Nil...@co...> wrote: > > Jeff > > I don't think you can create initiator without message-store factory. > However you can create it without log-factory. This could be because the > message-store is been used for guaranteed message delivery, irrespective > of TCP or UDP, as required by the FIX specifications. > > Cheers > -NIlesh > > >-----Original Message----- > >From: qui...@li... > [mailto:quickfix- > >dev...@li...] On Behalf Of Jeff > >Sent: Thursday, March 06, 2008 12:34 AM > >To: qui...@li... > >Subject: Re: [Quickfix-developers] Testing QuickFix with NUnit > > > >QuickFIX Documentation: > >http://www.quickfixengine.org/quickfix/doc/html/index.html > >QuickFIX Support: http://www.quickfixengine.org/services.html > > > This e-mail and any files transmitted with it are for the sole use of the > intended recipient(s) and may contain confidential and privileged > information. > If you are not the intended recipient, please contact the sender by reply > e-mail and destroy all copies of the original message. > Any unauthorised review, use, disclosure, dissemination, forwarding, > printing or copying of this email or any action taken in reliance on this > e-mail is strictly > prohibited and may be unlawful. > |
From: Oren M. <or...@qu...> - 2008-03-07 20:34:59
|
This is something we want to look into. We have NUnit tests for QuickFIX which works fine since we aren't crossing app domains, but it is annoying not to be able to unit test object that make use of QuickFIX. There are gchandles in both those objects, I'll need to reevaluate what is going on in there. --oren On Mar 6, 2008, at 7:59 AM, Jeff wrote: > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/ > html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > > Thanks for the reply! It's not so much that I want to create it > without the message-store factory, I was just asking that in an > attempt for more testing. > > The big issue is that it's not possible to test with Nunit due to > the gchandle crossing app domains problem, which appears to be in > the log factory and the message store factory. > > I suppose no one is really using NUnit to do any unit testing with > this library? > > QuickFix developers: Are there any unnecessary gchandles being > passed in the log and message store factories? > > Thanks! > > Jeff > > On Thu, Mar 6, 2008 at 12:30 AM, <Nil...@co...> wrote: > > Jeff > > I don't think you can create initiator without message-store factory. > However you can create it without log-factory. This could be > because the > message-store is been used for guaranteed message delivery, > irrespective > of TCP or UDP, as required by the FIX specifications. > > Cheers > -NIlesh > > >-----Original Message----- > >From: qui...@li... > [mailto:quickfix- > >dev...@li...] On Behalf Of Jeff > >Sent: Thursday, March 06, 2008 12:34 AM > >To: qui...@li... > >Subject: Re: [Quickfix-developers] Testing QuickFix with NUnit > > > >QuickFIX Documentation: > >http://www.quickfixengine.org/quickfix/doc/html/index.html > >QuickFIX Support: http://www.quickfixengine.org/services.html > > > This e-mail and any files transmitted with it are for the sole use > of the intended recipient(s) and may contain confidential and > privileged information. > If you are not the intended recipient, please contact the sender by > reply e-mail and destroy all copies of the original message. > Any unauthorised review, use, disclosure, dissemination, > forwarding, printing or copying of this email or any action taken > in reliance on this e-mail is strictly > prohibited and may be unlawful. > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers |
From: Jeff <jhe...@gm...> - 2008-03-07 20:39:43
|
Oren, Thanks for the update - let me know if there is anything I can do to help out in the process. Thanks! Jeff On Fri, Mar 7, 2008 at 3:37 PM, Oren Miller <or...@qu...> wrote: > This is something we want to look into. We have NUnit tests for QuickFIX > which works fine since we aren't crossing app domains, but it is annoying > not to be able to unit test object that make use of QuickFIX. There are > gchandles in both those objects, I'll need to reevaluate what is going on in > there. > --oren > > On Mar 6, 2008, at 7:59 AM, Jeff wrote: > > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > > Thanks for the reply! It's not so much that I want to create it without > the message-store factory, I was just asking that in an attempt for more > testing. > > The big issue is that it's not possible to test with Nunit due to the > gchandle crossing app domains problem, which appears to be in the log > factory and the message store factory. > > I suppose no one is really using NUnit to do any unit testing with this > library? > > QuickFix developers: Are there any unnecessary gchandles being passed in > the log and message store factories? > > Thanks! > > Jeff > > On Thu, Mar 6, 2008 at 12:30 AM, <Nil...@co...> wrote: > > > > > Jeff > > > > I don't think you can create initiator without message-store factory. > > However you can create it without log-factory. This could be because the > > message-store is been used for guaranteed message delivery, irrespective > > of TCP or UDP, as required by the FIX specifications. > > > > Cheers > > -NIlesh > > > > >-----Original Message----- > > >From: qui...@li... > > [mailto:quickfix- > > >dev...@li...] On Behalf Of Jeff > > >Sent: Thursday, March 06, 2008 12:34 AM > > >To: qui...@li... > > >Subject: Re: [Quickfix-developers] Testing QuickFix with NUnit > > > > > >QuickFIX Documentation: > > >http://www.quickfixengine.org/quickfix/doc/html/index.html > > >QuickFIX Support: http://www.quickfixengine.org/services.html > > > > > > This e-mail and any files transmitted with it are for the sole use of > > the intended recipient(s) and may contain confidential and privileged > > information. > > If you are not the intended recipient, please contact the sender by > > reply e-mail and destroy all copies of the original message. > > Any unauthorised review, use, disclosure, dissemination, forwarding, > > printing or copying of this email or any action taken in reliance on this > > e-mail is strictly > > prohibited and may be unlawful. > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > > > |