<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: NHibernate unit testing with SQLite in-memory DB</title>
	<atom:link href="http://jasondentler.com/blog/2009/08/nhibernate-unit-testing-with-sqlite-in-memory-db/feed/" rel="self" type="application/rss+xml" />
	<link>http://jasondentler.com/blog/2009/08/nhibernate-unit-testing-with-sqlite-in-memory-db/</link>
	<description>I&#039;m just here for the code</description>
	<lastBuildDate>Sun, 28 Feb 2010 13:09:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bill Bartmann</title>
		<link>http://jasondentler.com/blog/2009/08/nhibernate-unit-testing-with-sqlite-in-memory-db/comment-page-1/#comment-255</link>
		<dc:creator>Bill Bartmann</dc:creator>
		<pubDate>Wed, 02 Sep 2009 03:38:30 +0000</pubDate>
		<guid isPermaLink="false">http://jasondentler.com/blog/?p=219#comment-255</guid>
		<description>Excellent site, keep up the good work</description>
		<content:encoded><![CDATA[<p>Excellent site, keep up the good work</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How-To: Using the N* Stack, part 4 - NHibernate blog - NHibernate Forge</title>
		<link>http://jasondentler.com/blog/2009/08/nhibernate-unit-testing-with-sqlite-in-memory-db/comment-page-1/#comment-64</link>
		<dc:creator>How-To: Using the N* Stack, part 4 - NHibernate blog - NHibernate Forge</dc:creator>
		<pubDate>Sun, 16 Aug 2009 23:44:47 +0000</pubDate>
		<guid isPermaLink="false">http://jasondentler.com/blog/?p=219#comment-64</guid>
		<description>[...] you haven’t already, grab the code for the SQLiteDatabaseScope class from my previous post. Add it to your data test [...]</description>
		<content:encoded><![CDATA[<p>[...] you haven’t already, grab the code for the SQLiteDatabaseScope class from my previous post. Add it to your data test [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://jasondentler.com/blog/2009/08/nhibernate-unit-testing-with-sqlite-in-memory-db/comment-page-1/#comment-63</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Sun, 16 Aug 2009 18:58:40 +0000</pubDate>
		<guid isPermaLink="false">http://jasondentler.com/blog/?p=219#comment-63</guid>
		<description>@Tobin - I played around with the connection pooling options myself, but with that approach, I couldn&#039;t find a way to destroy the current database and build a fresh one. I even tried to use a system-generated password to trick connection pooling in to making a fresh DB. No dice.

The primary purpose of the SQLiteDatabaseScope is to maintain a DB connection for the lifetime of the object, no matter what you do with your session(s). 

Now that I have a better understanding of Session.Clear, I&#039;m not convinced it&#039;s necessary, but it&#039;s still nice to know exactly when I have a fresh DB and when I don&#039;t.</description>
		<content:encoded><![CDATA[<p>@Tobin &#8211; I played around with the connection pooling options myself, but with that approach, I couldn&#8217;t find a way to destroy the current database and build a fresh one. I even tried to use a system-generated password to trick connection pooling in to making a fresh DB. No dice.</p>
<p>The primary purpose of the SQLiteDatabaseScope is to maintain a DB connection for the lifetime of the object, no matter what you do with your session(s). </p>
<p>Now that I have a better understanding of Session.Clear, I&#8217;m not convinced it&#8217;s necessary, but it&#8217;s still nice to know exactly when I have a fresh DB and when I don&#8217;t.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobin Harris</title>
		<link>http://jasondentler.com/blog/2009/08/nhibernate-unit-testing-with-sqlite-in-memory-db/comment-page-1/#comment-62</link>
		<dc:creator>Tobin Harris</dc:creator>
		<pubDate>Sun, 16 Aug 2009 16:22:05 +0000</pubDate>
		<guid isPermaLink="false">http://jasondentler.com/blog/?p=219#comment-62</guid>
		<description>Nice post.

I&#039;m pretty sure you can enable *connection pooling* so that your in-memory database doesn&#039;t go away once you close the connection. I&#039;ve mentioned this on my blog post about NHibernate + SQLite testing

http://tobinharris.com/past/2009/8/1/in-memory-sqlite-testing-with-nhibernate/

I don&#039;t bother with the connection pooling,  I haven&#039;t seen the need for it yet (NHibernate is closing connections during the run of single test in my solutions).  Like you, I am keen on having a fresh DB for each test too, I&#039;ve even played with using a file-based sqlite db and doing a file-system copy of the blank db for each test - but it didn&#039;t perform (as you&#039;ll see on the blog post).

Like the idea of being able to run tests in parallel, that&#039;s very neat. 

I don&#039;t quite see how the Scope adds additional value though? Maybe it&#039;s a kind of test-specific Unit of Work? I guess you want to control when connections are closed (so as not to lose your db!), but I&#039;ve not seen any problems using the &quot;create session/do work/commit work/dispose session&quot; approach during SQLite in-memory testing. 

Anyway, I&#039;m always interested in new ideas for this,</description>
		<content:encoded><![CDATA[<p>Nice post.</p>
<p>I&#8217;m pretty sure you can enable *connection pooling* so that your in-memory database doesn&#8217;t go away once you close the connection. I&#8217;ve mentioned this on my blog post about NHibernate + SQLite testing</p>
<p><a href="http://tobinharris.com/past/2009/8/1/in-memory-sqlite-testing-with-nhibernate/" rel="nofollow">http://tobinharris.com/past/2009/8/1/in-memory-sqlite-testing-with-nhibernate/</a></p>
<p>I don&#8217;t bother with the connection pooling,  I haven&#8217;t seen the need for it yet (NHibernate is closing connections during the run of single test in my solutions).  Like you, I am keen on having a fresh DB for each test too, I&#8217;ve even played with using a file-based sqlite db and doing a file-system copy of the blank db for each test &#8211; but it didn&#8217;t perform (as you&#8217;ll see on the blog post).</p>
<p>Like the idea of being able to run tests in parallel, that&#8217;s very neat. </p>
<p>I don&#8217;t quite see how the Scope adds additional value though? Maybe it&#8217;s a kind of test-specific Unit of Work? I guess you want to control when connections are closed (so as not to lose your db!), but I&#8217;ve not seen any problems using the &#8220;create session/do work/commit work/dispose session&#8221; approach during SQLite in-memory testing. </p>
<p>Anyway, I&#8217;m always interested in new ideas for this,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How-To: Using the N* Stack, part 4 &#171; BASICly everything</title>
		<link>http://jasondentler.com/blog/2009/08/nhibernate-unit-testing-with-sqlite-in-memory-db/comment-page-1/#comment-58</link>
		<dc:creator>How-To: Using the N* Stack, part 4 &#171; BASICly everything</dc:creator>
		<pubDate>Sun, 16 Aug 2009 09:06:08 +0000</pubDate>
		<guid isPermaLink="false">http://jasondentler.com/blog/?p=219#comment-58</guid>
		<description>[...] About                   &#171; NHibernate unit testing with SQLite in-memory DB [...]</description>
		<content:encoded><![CDATA[<p>[...] About                   &laquo; NHibernate unit testing with SQLite in-memory DB [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
