> > +    assert_not_equal err.id, err1.id
>
> is always a valid assertion.
>
> > -    assert_not_equal err.at, err1.at
>
> is the right assertion.

Okay, then maybe a sleep(1) is necessary.
-----------------------------------------------
diff --git a/ruote-2.1.11/test/functional/ft_2_errors.rb b/
ruote-2.1.11/test/functional/ft_2_errors.rb
index bb7df7a..e65619f 100644
--- a/ruote-2.1.11/test/functional/ft_2_errors.rb
+++ b/ruote-2.1.11/test/functional/ft_2_errors.rb
@@ -78,6 +78,7 @@ class FtErrorsTest < Test::Unit::TestCase

     err = ps.errors.first

+    sleep(1)
     @engine.replay_at_error(err)

     wait_for(wfid)
-----------------------------------------------
or
-----------------------------------------------
$ ruby test/functional/ft_2_errors.rb
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]
Wed Dec 08 13:48:55 +0800 2010
Loaded suite test/functional/ft_2_errors
Started
.......F...
Finished in 2.359 seconds.

  1) Failure:
test_error_replay(FtErrorsTest) [test/functional/ft_2_errors.rb:93]:
<"2010-12-08 05:48:58.901025 UTC"> expected to be != to
<"2010-12-08 05:48:58.901025 UTC">.

11 tests, 33 assertions, 1 failures, 0 errors
-----------------------------------------------

here is the test case to improve coverage

$ cat test/functional/ft_47_misc.rb
-----------------------------------------------
#
# testing ruote
#
# Sat Sep 20 23:40:10 JST 2008
#


require File.join(File.dirname(__FILE__), 'base')


class Klass
    def initialize(str)
        @str = str
        @f = File.new(File.dirname(__FILE__))
    end
    def sayHello
        p @str
    end
end

class FtMisc < Test::Unit::TestCase
    include FunctionalBase

    def test_fulldup
        Ruote::p_caller("hello")
        o = Klass.new("hello")
        a = Ruote::fulldup(o)
        assert(a.is_a?(Klass))
    end

    def test_noisy

        pdef = Ruote.process_definition :name => 'test' do
            sequence do
                echo 'a'
                echo 'b'
            end
        end

        noisy

        assert_trace("a\nb", pdef)
    end

    def test_storage_dump
        storage = Ruote::FsStorage.new("test_storage_dump")
        5.times do |i|
            storage.put(
                '_id' => sprintf("yy!%0.2d", i),
                'type' => 'errors',
                'msg' => "whatever #{i}")
        end

        puts storage.dump("errors")
        puts storage.ids("errors")
        storage.purge_type!("errors")
        assert_equal 0, storage.get_many('errors').size

        storage.purge!
        storage.close if storage.respond_to?(:close)
    end

end
-----------------------------------------------

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to