<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Meta Bates &#187; tests</title>
	<atom:link href="http://www.metabates.com/tag/tests/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.metabates.com</link>
	<description>The technical ramblings of Mark Bates.</description>
	<lastBuildDate>Wed, 10 Mar 2010 15:46:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Temporary fix for the DataMapper bug</title>
		<link>http://www.metabates.com/2008/04/09/temporary-fix-for-the-datamapper-bug/</link>
		<comments>http://www.metabates.com/2008/04/09/temporary-fix-for-the-datamapper-bug/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 01:36:49 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[data mapper]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[tests]]></category>

		<guid isPermaLink="false">http://www.mackframework.com/?p=56</guid>
		<description><![CDATA[If like me you&#8217;re plagued by this DataMapper bug that kills your test cases. I&#8217;ve packaged up a temporary version of the DataMapper gem that seems to fix the problem.
WARNING: This gem is NOT sanctioned by the DataMapper team. Use at your own risk.
If you use this gem and find any issues, please let me [...]]]></description>
			<content:encoded><![CDATA[<p>If like me you&#8217;re plagued by this DataMapper bug that kills your test cases. I&#8217;ve packaged up a temporary version of the DataMapper gem that seems to fix the problem.</p>
<p>WARNING: This gem is NOT sanctioned by the DataMapper team. Use at your own risk.</p>
<p>If you use this gem and find any issues, please let me know. Also, if you use this gem and things seem to be working just fine, then please let me know that too. Good luck!</p>
<p><a href="http://www.mackframework.com/wp-content/uploads/2008/04/datamapper-0301gem.zip">DataMapper-0.3.0.1.gem</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2008/04/09/temporary-fix-for-the-datamapper-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Horrible bug in DataMapper 0.3.0</title>
		<link>http://www.metabates.com/2008/04/09/horrible-bug-in-datamapper-030/</link>
		<comments>http://www.metabates.com/2008/04/09/horrible-bug-in-datamapper-030/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 16:14:19 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[comparable]]></category>
		<category><![CDATA[data mapper]]></category>
		<category><![CDATA[tests]]></category>

		<guid isPermaLink="false">http://www.mackframework.com/?p=53</guid>
		<description><![CDATA[http://wm.lighthouseapp.com/projects/4819-datamapper/tickets/185-including-comparable-in-class-class-breaks-test-unit-and-probably-more#ticket-185-8
In the gem at the bottom of lib/data_mapper/support/typed_set.rb there is the following code:
class Class
Â Â include Comparable
Â Â def &#60;=&#62;(other)
Â Â  Â name &#60;=&#62; other.name
Â Â end
end
This causese Test::Runner to through up an error similar to this:
/usr/local/lib/ruby/1.8/test/unit/collector/objectspace.rb:25:in `collect': undefined method `suite' for Gem::LoadError:Class (NoMethodError)
from /usr/local/lib/ruby/1.8/test/unit/collector/objectspace.rb:23:in `each_object'
from /usr/local/lib/ruby/1.8/test/unit/collector/objectspace.rb:23:in `collect'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:58
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:213:in `[]'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:213:in `run'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
from /usr/local/lib/ruby/1.8/test/unit.rb:278
from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader.rb:5
rake aborted!
It also causes your tests to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wm.lighthouseapp.com/projects/4819-datamapper/tickets/185-including-comparable-in-class-class-breaks-test-unit-and-probably-more#ticket-185-8" target="_blank">http://wm.lighthouseapp.com/projects/4819-datamapper/tickets/185-including-comparable-in-class-class-breaks-test-unit-and-probably-more#ticket-185-8</a></p>
<p>In the gem at the bottom of lib/data_mapper/support/typed_set.rb there is the following code:</p>
<pre>class Class
Â Â include Comparable
Â Â def &lt;=&gt;(other)
Â Â  Â name &lt;=&gt; other.name
Â Â end
end</pre>
<p>This causese Test::Runner to through up an error similar to this:</p>
<pre>/usr/local/lib/ruby/1.8/test/unit/collector/objectspace.rb:25:in `collect': undefined method `suite' for Gem::LoadError:Class (NoMethodError)
from /usr/local/lib/ruby/1.8/test/unit/collector/objectspace.rb:23:in `each_object'
from /usr/local/lib/ruby/1.8/test/unit/collector/objectspace.rb:23:in `collect'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:58
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:213:in `[]'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:213:in `run'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
from /usr/local/lib/ruby/1.8/test/unit.rb:278
from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader.rb:5
rake aborted!</pre>
<p>It also causes your tests to blow up and not run. Which, if you&#8217;re trying to do any development causes some real problems! If you comment out &#8216;include Comparable&#8217; from Class things seem to work just fine. I say seem, because I haven&#8217;t done any real extensive testing with this. The other thing you can do is revert to 0.2.5, but that&#8217;s up to you. Either way, it&#8217;s not really optimal. Let&#8217;s hope they fix this soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2008/04/09/horrible-bug-in-datamapper-030/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let&#8217;s talk DataMapper</title>
		<link>http://www.metabates.com/2008/04/07/lets-talk-data-mapper/</link>
		<comments>http://www.metabates.com/2008/04/07/lets-talk-data-mapper/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 19:19:08 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[active record]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[data mapper]]></category>
		<category><![CDATA[mack]]></category>
		<category><![CDATA[orm]]></category>
		<category><![CDATA[tests]]></category>

		<guid isPermaLink="false">http://www.mackframework.com/?p=50</guid>
		<description><![CDATA[As you may, or may not know, DataMapper is the new ORM framework on the scene these days in the Ruby world. It&#8217;s getting a lot of hype for being clean, fast, simple, and feature rich. Oh, and it&#8217;s not ActiveRecord. I think that seems to be the real thing that is driving people to [...]]]></description>
			<content:encoded><![CDATA[<p>As you may, or may not know, DataMapper is the new ORM framework on the scene these days in the Ruby world. It&#8217;s getting a lot of hype for being clean, fast, simple, and feature rich. Oh, and it&#8217;s not ActiveRecord. I think that seems to be the real thing that is driving people to DataMapper, the fact that it&#8217;s not ActiveRecord.</p>
<p>I will say DataMapper is clean, simple, and feature rich. In 0.3.0 they&#8217;ve added migrations, which is great. Btw, a little off topic, but I&#8217;m working on migration support for both ActiveRecord and DataMapper in Mack as we speak. It should, hopefully, be out sometime this week. What I won&#8217;t give DataMapper is that it&#8217;s fast. In my tests, and I&#8217;ll provide some number below, DataMapper only seems to win on inserts, after that ActiveRecord beats it hands down. In all fairness to DataMapper I&#8217;m starting to think that the problems are not at the DataMapper layer, but at the underlying Data Objects layer that DataMapper uses. As you&#8217;ll see from my tests DataMapper seems very heavilyÂ optimizedÂ towards MySQL over PostgreSQL. This, to me, leans towards a difference in the underlying adapters.</p>
<p>Another problem I have with DataMapper is that I have to set the &#8216;properties&#8217; of the model inside the model itself. It&#8217;s an old school approach, and it does have the benefit of being self documenting, but it also has the drawbacks of constantÂ maintenanceÂ and clutter at the top of your model. Not to mention potential conflicts when running through migrations, etc&#8230;</p>
<p>I&#8217;m also having one other little problem these days. This has only been a problem since I&#8217;ve gone DataMapper 0.3.0. At the end of some of rake tasks, if I have DataMapper required, I get this:</p>
<p>Â </p>
<pre>/usr/local/lib/ruby/1.8/test/unit/collector/objectspace.rb:25:in `collect': undefined method `suite' for Gem::VerificationError:Class (NoMethodError)
from /usr/local/lib/ruby/1.8/test/unit/collector/objectspace.rb:23:in `each_object'
from /usr/local/lib/ruby/1.8/test/unit/collector/objectspace.rb:23:in `collect'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:58
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:213:in `[]'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:213:in `run'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
from /usr/local/lib/ruby/1.8/test/unit.rb:278</pre>
<p>The rake task completed successfully, but I get this fairly random error message. If anyone out there is also getting this message, please let me know what it is. I&#8217;m open for ideas on this one.</p>
<p>Despite these issues I have with DataMapper, I&#8217;m going to keep striving to provide support for both it and ActiveRecord in Mack. I think it&#8217;s important to give people a choice and not force them to use the one I think is either easier to code for, or better. Both of which I&#8217;m not saying about ActiveRecord, but in technologies in general.</p>
<p>Anyway, enough of my blather, here are the test results I was speaking about:</p>
<p>Â </p>
<p><span style="color: #800000;">Running time 1.693881 seconds. [MESSAGE]: DM: postgresql: Inserts</span><br />
Running time 2.799189 seconds. [MESSAGE]: AR: postgresql: Inserts</p>
<p>Running time 1.368185 seconds. [MESSAGE]: DM: postgresql: Individual Reads<br />
<span style="color: #800000;">Running time 0.734143 seconds. [MESSAGE]: AR: postgresql: Individual Reads</span></p>
<p>Running time 0.917551 seconds. [MESSAGE]: DM: postgresql: Bulk Reads<br />
<span style="color: #800000;">Running time 0.121198 seconds. [MESSAGE]: AR: postgresql: Bulk Reads</span></p>
<p>Running time 2.309244 seconds. [MESSAGE]: DM: postgresql: Updates<br />
<span style="color: #800000;">Running time 2.079578 seconds. [MESSAGE]: AR: postgresql: Updates</span></p>
<p>Running time 1.802914 seconds. [MESSAGE]: DM: postgresql: Deletes<br />
<span style="color: #800000;">Running time 1.708714 seconds. [MESSAGE]: AR: postgresql: Deletes</span></p>
<p><span style="color: #800000;">Running time 0.433761 seconds. [MESSAGE]: DM: mysql: Inserts</span><br />
Running time 2.621093 seconds. [MESSAGE]: AR: mysql: Inserts</p>
<p>Running time 1.073741 seconds. [MESSAGE]: DM: mysql: Individual Reads<br />
<span style="color: #800000;">Running time 0.207305 seconds. [MESSAGE]: AR: mysql: Individual Reads</span></p>
<p>Running time 0.827842 seconds. [MESSAGE]: DM: mysql: Bulk Reads<br />
<span style="color: #800000;">Running time 0.073593 seconds. [MESSAGE]: AR: mysql: Bulk Reads</span></p>
<p><span style="color: #800000;">Running time 1.204845 seconds. [MESSAGE]: DM: mysql: Updates</span><br />
Running time 1.738602 seconds. [MESSAGE]: AR: mysql: Updates</p>
<p><span style="color: #800000;">Running time 1.010774 seconds. [MESSAGE]: DM: mysql: Deletes</span><br />
Running time 1.251691 seconds. [MESSAGE]: AR: mysql: Deletes</p>
<p>Â </p>
<p>Â </p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2008/04/07/lets-talk-data-mapper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.315 seconds -->
