1

I have a set of Java GUI tests on Windows that sometimes fail to cleanup a file or a window due to a lock. The next time any test starts I get a "Failed to start build #XXX on agent" message. The build then fails very quickly on that agent, which frees the agent to run another build and this results in a lot of builds failing with the same message on the same agent.

Is there a way to disable the agent when the problem occurs and maybe send a notification?

MartinTeeVarga
  • 10,478
  • 12
  • 61
  • 98

1 Answers1

2

Rather than disabling the agent, you could try cleaning the files which get locked. Try using Swabra (Build Files Cleaner)

enter image description here

Mohammad Nadeem
  • 9,134
  • 14
  • 56
  • 82
  • The issue here is that java process will be the one locking some files. Swabra will tell me that, but won't kill it AFAIK. Maybe a way how to kill a java process spawned by Team City would be enough (there are always some Java processes running, so I can't simply run tskill java on windows). – MartinTeeVarga Jul 06 '15 at 23:23
  • +1 because it helped. It did not solve everything yet, because there is a process that is not killed (java.exe) and is not blocking anything. However it still makes everything fail because it is using other resources. Killing this process (or disabling an agent) would solve this. – MartinTeeVarga Jul 10 '15 at 03:04