From a25fb20b54b3ed12ad8e4a187cf320889a279ddb Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <albertito@blitiri.com.ar>
Date: Wed, 15 Jul 2009 15:48:56 -0300
Subject: [PATCH 38/74] tests/behaviour: Add a new test to write a big (~2mb) transaction

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
---
 tests/behaviour/t_normal.py |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/tests/behaviour/t_normal.py b/tests/behaviour/t_normal.py
index 5a84e54..c5d608c 100644
--- a/tests/behaviour/t_normal.py
+++ b/tests/behaviour/t_normal.py
@@ -347,3 +347,19 @@ def test_n21():
 	fsck_verify(n)
 	cleanup(n)
 
+def test_n22():
+	"jpread/jpwrite ~2mb"
+	c = gencontent(2 * 1024 * 1024 + 1465)
+
+	f, jf = bitmp(jflags = libjio.J_LINGER)
+	n = f.name
+
+	jf.pwrite(c, 2000)
+	assert content(n) == '\0' * 2000 + c
+	assert jf.pread(len(c), 2000) == c
+	del jf
+
+	fsck_verify(n)
+	cleanup(n)
+
+
-- 
1.6.2.2.646.gb214


