Show More
Commit Description:
added message hiding for admin in msg console...
Commit Description:
added message hiding for admin in msg console
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@371 6386c4cd-e34a-4fa8-8920-d93eb39b512e
References:
File last commit:
Show/Diff file:
Action:
test/concurrent/task_test_get.rb
| 16 lines
| 310 B
| text/x-ruby
| RubyLexer
|
|
r30 | ENV["RAILS_ENV"] = "test" | ||
require File.expand_path(File.dirname(__FILE__) + "/../../config/environment") | ||||
def take_wait_return | ||||
task = Task.get_inqueue_and_change_status(Task::STATUS_GRADING) | ||||
sleep (rand)/10.0 | ||||
task.status_complete | ||||
task.save! | ||||
end | ||||
n = 300 | ||||
n.times do |i| | ||||
take_wait_return | ||||
puts i | ||||
end | ||||