def testMemoryLeak(self):
        config = {
            'init_config': {},
            'instances': [
                {'url': "localhost"},
                {'url': "localhost", 'port': PORT, 'tags': ['instance:mytag']},
                {'url': "localhost", 'port': PORT, 'tags': ['foo']},
            ]
        }

        self.run_check(config)

        import gc
        if not self.is_travis():
            gc.set_debug(gc.DEBUG_LEAK)
        gc.collect()
        try:
            start = len(gc.garbage)
            for i in range(10):
                self.run_check(config)
                time.sleep(0.3)
                self.check.get_metrics()

            end = len(gc.garbage)
            self.assertEquals(start - end, 0, gc.garbage)
        finally:
            gc.set_debug(0)
dataset/ETHPy150Open serverdensity/sd-agent/tests/checks/integration/test_mcache.py/TestMemCache.testMemoryLeak/swapped operands of `-`