Exemple #1
0
 def test_reader(self):
     self.foo.phout_file = 'data/phout_timeout_mix.txt'
     self.foo.phantom_start_time = time.time()
     reader = PhantomReader(AggregatorPlugin(self.foo.core), self.foo)
     reader.check_open_files()
     
     data = reader.get_next_sample(False)
     while data:
         times_sum = 0
         for timing in data.overall.times_dist:
             times_sum += timing['count']
         self.assertEquals(sum(data.overall.net_codes.values()), times_sum)
         data = reader.get_next_sample(False)
    def test_reader(self):
        self.foo.phout_file = 'data/phout_timeout_mix.txt'
        self.foo.phantom_start_time = time.time()
        reader = PhantomReader(AggregatorPlugin(self.foo.core), self.foo)
        reader.check_open_files()

        data = reader.get_next_sample(False)
        while data:
            times_sum = 0
            for timing in data.overall.times_dist:
                times_sum += timing['count']
            self.assertEquals(sum(data.overall.net_codes.values()), times_sum)
            data = reader.get_next_sample(False)
    def test_reader(self):
        self.phantom_plugin_instance.phantom_start_time = time.time()
        reader = PhantomReader(AggregatorPlugin(self.phantom_plugin_instance.core), self.phantom_plugin_instance)
        reader.phout_file = 'data/phout_timeout_mix.txt'
        reader.check_open_files()

        data = reader.get_next_sample(False)
        while data:
            times_sum = 0
            for timing in data.overall.times_dist:
                times_sum += timing['count']
            # FIXME: kinda strange problem here
            #self.assertEquals(sum(data.overall.net_codes.values()), times_sum)
            data = reader.get_next_sample(False)
Exemple #4
0
 def test_run(self):
     self.foo.core.set_option(PhantomPlugin.SECTION, "config", '')
     self.foo.configure()
     self.foo.prepare_test()
     reader = PhantomReader(AggregatorPlugin(self.foo.core), self.foo)
     self.foo.start_test()
     
     while self.foo.is_test_finished() < 0:
         self.foo.log.debug("Not finished")
         reader.check_open_files()
         reader.get_next_sample(False)
         time.sleep(1)
     if self.foo.is_test_finished() != 0:
         raise RuntimeError("RC: %s" % self.foo.is_test_finished())
     self.foo.end_test(0)
     reader.get_next_sample(True)
    def test_run(self):
        self.foo.core.set_option(PhantomPlugin.SECTION, "config", '')
        self.foo.configure()
        self.foo.prepare_test()
        reader = PhantomReader(AggregatorPlugin(self.foo.core), self.foo)
        self.foo.start_test()

        while self.foo.is_test_finished() < 0:
            self.foo.log.debug("Not finished")
            reader.check_open_files()
            reader.get_next_sample(False)
            time.sleep(1)
        if self.foo.is_test_finished() != 0:
            raise RuntimeError("RC: %s" % self.foo.is_test_finished())
        self.foo.end_test(0)
        reader.get_next_sample(True)
Exemple #6
0
    def test_reader(self):
        self.phantom_plugin_instance.phantom_start_time = time.time()
        reader = PhantomReader(
            AggregatorPlugin(self.phantom_plugin_instance.core),
            self.phantom_plugin_instance)
        reader.phout_file = 'data/phout_timeout_mix.txt'
        reader.check_open_files()

        data = reader.get_next_sample(False)
        while data:
            times_sum = 0
            for timing in data.overall.times_dist:
                times_sum += timing['count']
            # FIXME: kinda strange problem here
            #self.assertEquals(sum(data.overall.net_codes.values()), times_sum)
            data = reader.get_next_sample(False)