Least favoiraite bug of the week

time to read 2 min | 312 words

Tracking a failing test through:

  1. Mock objects with heavy use of constraints
  2. Remoting
  3. Three differenent exception handling policies

 

Nevertheless, stubbornness pays off in the end, and I get this lovely picture. All green!

Just to note, this is NHibernate Query Analyzer running against NHibernate 1.0.2 on .Net 2.0! I had the devil of a time porting NQA from 0.9 to 1.0, mainly because of changes in the way queries were processed that I couldn't really track down. I finally found what the issue was (by single stepping through the entire process[1] and finding out what calls I needed to make and in what order. I then just used some reflection tricks to do so (something I tried to avoid in the past). It works like a charm.

 



LLet me tell you, the parser NHibernate has for queries is not something you want to look at in your spare time. It's a full blown parser that looks to be hand-written. It's filled with special cases and handling of stuff in several different places.