Skip to content

Conversation

hranicka
Copy link
Contributor

Fixes #25 with test case for the bug.

@@ -21,7 +21,7 @@ class SQLiteJournalTest extends IJournalTestCase

public function createJournal()
{
return new SQLiteJournal;
return new SQLiteJournal(TEMP_DIR . '/sqlitejournal_' . uniqid() . '.sqlite');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For "in memory" SQLite storage there were problems :o

See https://travis-ci.org/nette/caching/builds/71373010

It looks like that test cases shared the same database but it was OK before my changes, I don't know why...


Now, it is OK: https://travis-ci.org/nette/caching/builds/71373257

@@ -108,25 +108,26 @@ public function clean(array $conditions)
}

if (!empty($conditions[Cache::PRIORITY])) {
$priority = (int) $conditions[Cache::PRIORITY];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this new variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'll remove it... It's trace after 239a9f6

@dg
Copy link
Member

dg commented Jul 17, 2015

Can you squash it to single commit?

@hranicka
Copy link
Contributor Author

I've cleaned it up.

Really should I squash these commits?

@dg
Copy link
Member

dg commented Jul 17, 2015

This is fine, thanks!

dg added a commit that referenced this pull request Jul 17, 2015
tests: SQLiteJournal 'Too many variables' bug test added [Ref #25]
@dg dg merged commit e1f91b4 into nette:master Jul 17, 2015
@hranicka hranicka changed the title tests: SQLiteJournal 'Too many variables' bug test added [Ref #25] SQLiteJournal 'Too many variables' bug test added [Ref #25] Jul 17, 2015
@@ -21,7 +21,8 @@ class SQLiteJournalTest extends IJournalTestCase

public function createJournal()
{
return new SQLiteJournal;
static $id = 0;
return new SQLiteJournal(TEMP_DIR . '/sqlitejournal_' . ++$id . '.sqlite');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not possible share :memory: SQLite nor after these changes:

https://github.com/nette/caching/pull/27/files#diff-88c1903cdb7494caec03523cf64621b1R121

Nor if I replace BEGIN IMMEDIATE with BEGIN EXCLUSIVE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants