In order for tech to complete does the production building need to stay attached?

The Tech Lab must stay attached.

The research stops if:

  • your Tech Lab is destroyed
  • your Barracks is destroyed
  • you decide to lift off your Barracks and fly it to another location

After testing it a few minutes ago I discovered the following things.
1. The tech lab must stay attached
2. If the barracks lands down next to the tech lab immediately afterword, tech is not resumed and must be restarted.
3. The minerals/vespine gas spent will be refunded.