Build agent temp directory

We have many tests that create temporary databases in the temp directory
as fed to us by the OS. I'm noticing in TeamCity Version 3.0 EAP (build
5813), the agent has its own temp folder in C:\TeamCity\buildAgent\temp,
and it appears to have been created at the start of the current build.

Is this new to 5813? I ask, because we have some integration level tests
that will create a brand new temp database if needed, which is time
consuming, but can re-use pre-existing test dbs from build to build to
help performance.

What we've done historically, is leave the temp folder around throughout
the day, then delete it overnight and have an overnight run ensure the
tests still work when starting from scratch - and since that one is
overnight, we don't notice the performance hit.

In TeamCity, before upgrading to 5813, the performance of these tests
indicated to me that the same temp folder was re-used always, and I'd
made a note to at some point research a way to find this folder and kill
it overnight -- but now it seems I may need to find a way to keep the
temp folder around during the day and reset it at night.

1 comment

Chris,

We always tried to cleanup temp folders at the beginning of each build, so the current behaviour is correct by design (builds should be clean and temp directory should be removed between builds).

So, you cannot simply use temp directories in your build for such persistent database, you may use some directory inside your project directory instead.

Kind regards,
KIR

0

Please sign in to leave a comment.