Fix races / finally remove global app for good (#7570)

* finally remove global app for good

* test compilation fixes

* fix races

* fix deadlock

* wake up write pump so it doesn't take forever to clean up
Этот коммит содержится в:
Chris
2017-10-04 13:09:41 -07:00
коммит произвёл GitHub
родитель dc9b1a1d6a
Коммит 07777f5ff9
23 изменённых файлов: 139 добавлений и 67 удалений

Просмотреть файл

@@ -12,6 +12,7 @@ import (
func TestLoadLicense(t *testing.T) {
th := Setup()
defer th.TearDown()
th.App.LoadLicense()
if utils.IsLicensed() {
@@ -21,6 +22,7 @@ func TestLoadLicense(t *testing.T) {
func TestSaveLicense(t *testing.T) {
th := Setup()
defer th.TearDown()
b1 := []byte("junk")
@@ -31,6 +33,7 @@ func TestSaveLicense(t *testing.T) {
func TestRemoveLicense(t *testing.T) {
th := Setup()
defer th.TearDown()
if err := th.App.RemoveLicense(); err != nil {
t.Fatal("should have removed license")