Exemple #1
0
    def test_hello(self):
        "test if grid can do simple tasks"
        self.skipTest("grid tests require specific machine setup")
        grid = self.create_grid()
        self.grid = grid
        #fork and execute grid.run() in a child
        grid.start()

        #if necessary use grid.copy_files(src, filenames) to copy files over.
        #files in the local dir are already copied

        grid.copy_files(self.src_path, ['shared_functions.py'])

        #use grid.publish(stuff) to send stuff to all nodes.
        #returns a service id.

        instance=sf.sfo_common()
        service_id = grid.publish(instance)

        proxy = grid.servers.values()[0][0].proxy
        retval = proxy.hello().get()
        self.assertEqual(retval, "hello world")
 def setUp(self):
     IMP.test.TestCase.setUp(self)
     self.sfo = sf.sfo_common()
 def setUp(self):
     IMP.test.TestCase.setUp(self)
     self.sfo = sf.sfo_common()