Displaying 20 results from an estimated 300 matches similar to: "Adding before / after blocks to every spec"
2012 Apr 27
3
rails console --sandbox is only half-baked
Recently I''ve found out some mentions to the "--sandbox" parameter to
the "rails console" command.
And I found the idea interesting, but since I''m using Sequel instead of
ActiveRecord I guessed this wouldn''t work for me.
But after talking about this subject in the Sequel mailing list, Jeremy
Evans has brought to my attention that there are some
2007 Oct 08
3
test not rolling back
For testing, I use:
self.use_transactional_fixtures = true
This should cause a ROLLBACK for each test case. If I run a single
file, foo_controller_test.rb, it works as expected. I see BEGIN and
ROLLBACK 8 times in the log files. But if I run:
rake test:functionals
I get 3 COMMITs, 196 BEGINS and 193 ROLLBACKs. The code in fixtures.rb
that deals with this is :
def
2006 Jun 15
4
testing with transactions
Hello!
I experienced problems with testing transactions which are supposed to be
rolled back, but are not, because of transactional fixtures eliminating the
inner transaction. Can this be worked around somehow without turning off
transactional fixtures? Maybe savepoints can help this?
Does anyone have any experience with savepoints to achieve nested transaction
functionality? Both Postgres
2004 May 05
1
buffered tables, sessions, and transactions
Quartz has a QuartzDiskTable class which is a thin wrapper for a pair of
Btree objects (or just one if the table is opened readonly):
http://www.xapian.org/docs/sourcedoc/html/classQuartzDiskTable.html
There's also a QuartzBufferedTable class which adds memory buffering of
changes to this:
http://www.xapian.org/docs/sourcedoc/html/classQuartzBufferedTable.html
However, as of 0.8.0 we now
2007 Nov 15
2
Story adapter and SQLite Was:What command to run all stories?
Hi, by switching to MySQL from SQLite, it fixed the problem. I ran
rdebug on it and it is trying to call
I ActiveRecord::Base.connection.begin_db_transaction. from
ActiveRecordSafetyListener.scenario_started. I don''t think SQLLite
likes transactions.
Ed
On Nov 15, 2007 10:56 AM, Ed Howland <ed.howland at gmail.com> wrote:
> If I run the story stand-alone, I get:
> ruby
2013 Jun 19
2
Compact databases and removing stale records at the same time
I'm trying to compact (or at least merge) multiple databases, while stripping search records which are no longer required.
Backstory:
I've inherited the Cyrus IMAPd xapian-based search code from Greg Banks when he left Opera.
One of the unfinished parts was removing expunged emails from the search database.
We moved from having a single search database to supporting multiple
2006 Apr 03
4
How to fake composite primary keys?
I know ActiveRecord doesn''t support composite primary keys, but I need to use
one, and I need it ASAP. I don''t need any composite foreign keys, luckily;
what I have is a table that stores old versions of rows in another table, so
the composite key is an id + date stamp. Would someone tell me a hack I can
use to support this?
--
View this message in context:
2006 Aug 10
6
save without commit ?
How do I get ''save'' to execute without commit?
I have tried:
ActiveRecord::Base.connection.begin_db_transaction
# do some stuff that doesn''t issue a database COMMIT statement
# then:
@myObject.save
# this issues a COMMIT but it shouldn''t! Shouldn''t it wait until I''ve
called:
ActiveRecord::Base.connection.commit_db_transaction
?
what am
2006 Apr 25
2
Transactions and migrations (lots of records)???
Hi all -
I know this must be really easy to do, but I can''t for the life of me
figure it out.
I have about 100,000 rows I need to migrate over into rails using a
migration.
Right now, I select all of them out of the old database and do a series
of:
...
new.col = old.col
...
new.save
...
Problem is each one is it''s own transaction. And it''s slow. I''d
2005 Oct 17
2
Update or not?
After reading all the problems with the x86-64 update, I'm in a quandry
as to update this machine or not. Nothing that I am aware of is broken,
and at least everything I use works. This is NOT a production machine,
but it does have some important software that needs to run twice daily,
and I sure don't want to break things for that. If upgrade is not
necessary, how do I go about
2012 Oct 18
3
Issues upgrading RSpec
My specs work fine with this in my Gemfile.lock:
grep rspec Gemfile.lock
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
rspec-mocks (~> 2.11.0)
rspec-core (2.11.0)
rspec-expectations (2.11.1)
rspec-mocks (2.11.1)
rspec-rails (2.11.0)
rspec (~> 2.11.0)
rspec-rails (~> 2.11)
After "bundle update
2008 Apr 04
2
TransactionError
Hi
Today I got an alert mail from my watcher script, telling me that there was no
Mongrel running, and that it started one (so the site was down for a few
seconds.)
This is the first time I got this error (AFAICS), but I''d like to resolve and
prevent it for the future.
From mongrel.log:
** Starting Mongrel listening at 0.0.0.0:foo
** Starting Rails with production environment...
**
2006 Jan 31
0
"cannot start a transaction within a transaction" sqlite error on OS X Tiger but not Windows
I''ve been editing a rails app on Windows for a little while now. I
just checked it into source control and started editing on my iMac.
Everything seems to run normally, except that when I attempt to modify
the database in any way (I''m running sqlite), I get a weird error:
"cannot start a transaction within a transaction"
2005 Jul 28
0
autocommit problem with mysql
I''m trying to call save in active record after calling
begin_db_transaction. In the code I see no place where it calls
commit between create_or_update and the end of save.
However in the log I see a commit happen...and I don''t want commit to be called
does anyone know how to turn this off?
thanks
brian
2009 Mar 01
2
Maildir format use question
Hey all,
I've got a couple servers using Maildir format. As I understand it from
a simple perspective, 'new' contains newly delivered messages, and 'cur'
contains messages that have been 'handled'.
I like to keep things simple for users, so rather than have 'Spam',
'Junk' 'ToLearn' and other possibly confusing folders, what I thought I
would
2018 Mar 30
2
sorting large msets
Hello, is there a way to optimize sorting by certain values
for queries which return a huge amount of results?
For example, I just want a simple query that gives me the 200
most recent emails out of millions. The elapsed time for
get_mset increases as the number of documents ($n * 2000)
increases.
I suppose I could store a pre-sorted set using SQLite or
similar. Thanks in advance for any
2007 Feb 10
3
Dell PowerEdge 2950 Sharing NIC IRQ with Digium Card
Hi folks.. just a few weeks ago I wrote this to someone else:
------------------------
We have several 2900s in production as VoIP servers.. no lockups.
On every server I go into the BIOS and:
* Disable USB
* Disabled uneeded things like Parallel, Serial
* Put ETH0 on a seperate IRQ from the Digium card
And everything's fine. Dell's do NOT have to share IRQs... go into your
BIOS and
2002 Jul 17
6
Linux and Solaris performance
We have an interesting quandry here. When I'm rsync'ing my directory
tree (100 directories each containing 1000 files) I see some strange
results:
All of these machines are on their own network segment (100t) in our QA
lab
Solaris->Solaris - time taken: 11m32s
Solaris->RH Linux 7.2 - time taken: 206s
RH Linux->Rn Linux - time taken 1m59s
In each instance I have rsync running
2023 May 03
1
manual flushing thresholds for deletes?
Olly Betts <olly at survex.com> wrote:
> On Mon, Mar 27, 2023 at 11:22:09AM +0000, Eric Wong wrote:
> > Olly Betts <olly at survex.com> wrote:
> > > 10 seems too long. You want the mean word length weighted by frequency
> > > of occurrence. For English that's typically around 5 characters, which
> > > is 5 bytes. If we go for +1 that's:
2012 May 08
2
[LLVMdev] Scheduler Roadmap
Hi everyone,
As I've mentioned before we are doing some work on the LLVM scheduler to
improve it. Specifically, we are working to get loads and stores to
move past each other when possible.
When I asked about enhancing scheduler heuristics a month or so ago, I
got a response about a MachineInstr scheduler and that that was the way
of the LLVM future. Is that so? Is the ScheduleDAG going