Skip to content

Commit

Permalink
Shut down agent after each test (#1922)
Browse files Browse the repository at this point in the history
Since the `CodyIntegrationTextFixture` starts a fresh agent for every
test case, we need to shut down those agents during cleanup. Otherwise
the leftover agent processes clog the RAM (each Node process takes
50-250 MB), and the JVM threads which listen to them keep running
forever.

## Test plan

Manually run the stability check in CI
  • Loading branch information
odisseus authored Jul 24, 2024
1 parent 37ddfa7 commit 5659de4
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ open class CodyIntegrationTextFixture : BasePlatformTestCase() {
logger.warn("Error shutting down session", x)
}
}
CodyAgentService.getInstance(myFixture.project).apply {
try {
stopAgent(project)
} catch (x: Exception) {
logger.warn("Error shutting down agent", x)
}
}
} finally {
super.tearDown()
}
Expand Down

0 comments on commit 5659de4

Please sign in to comment.