<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Shards on Piotr Proszowski</title><link>https://proszkie.github.io/tags/shards/</link><description>Recent content in Shards on Piotr Proszowski</description><generator>Hugo</generator><language>en</language><managingEditor>p.proszowski@gmail.com (Piotr Proszowski)</managingEditor><webMaster>p.proszowski@gmail.com (Piotr Proszowski)</webMaster><lastBuildDate>Wed, 08 Jun 2022 18:04:00 +0200</lastBuildDate><atom:link href="https://proszkie.github.io/tags/shards/index.xml" rel="self" type="application/rss+xml"/><item><title>Sharded MongoDB in Integration Tests</title><link>https://proszkie.github.io/posts/integration-tests-the-proper-way/</link><pubDate>Wed, 08 Jun 2022 18:04:00 +0200</pubDate><author>p.proszowski@gmail.com (Piotr Proszowski)</author><guid>https://proszkie.github.io/posts/integration-tests-the-proper-way/</guid><description>&lt;h1 id="sharded-mongo-db-in-test-containers">Sharded Mongo Db in Test Containers&lt;/h1>
&lt;h2 id="tldr">TLDR;&lt;/h2>
&lt;p>Recently I had a pleasure to fix integration tests in one of inherited projects from another team. It used to run &lt;strong>from
8 to 15 minutes (!!!)&lt;/strong>, failed to run on M1 Apple Silicon Chip and was leaving some mess on machine where it executed.
The root of those troubles was setting up sharded MongoDb with use of &lt;a href="https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo" target="_blank" rel="noopener noreffer ">de.flapdoodle.embed.mongo&lt;/a>
. After
using TestContainers and few tweaks they need around 4 minutes to finish, developers with M1 Apple Silicon Chip are able
to run them and they leave machine in clean state.&lt;/p></description></item></channel></rss>