Skip to content

Commit

Permalink
adding test for java worker
Browse files Browse the repository at this point in the history
  • Loading branch information
romand committed May 13, 2012
1 parent bc4e55f commit d0bd3f4
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
Binary file added test/Hello.class
Binary file not shown.
5 changes: 5 additions & 0 deletions test/Hello.java
@@ -0,0 +1,5 @@
public class Hello {
public static void main(String[] args) {
System.out.println("hello");
}
}
Binary file added test/hello.jar
Binary file not shown.
21 changes: 21 additions & 0 deletions test/test_java_worker.rb
@@ -0,0 +1,21 @@
require 'helpers'

class JavaWorkerTest < IWNGTest

def test_hello
code = IronWorkerNG::Code.create do
runtime 'java'
name 'JavaHello'
exec 'test/hello.jar'
end
client.codes_create(code)

task = client.tasks_create('JavaHello')

client.tasks_wait_for(task.id)

assert_equal "hello\n", client.tasks.log(task.id),
'correct output'
end

end

0 comments on commit d0bd3f4

Please sign in to comment.