realize icon indicating copy to clipboard operation
realize copied to clipboard

Tests not running after 1st save (or 1st fail)

Open lalarsson opened this issue 5 years ago • 8 comments

Hi! TLDR; tests won't run again anymore :( Thanks for your awesome work! Sadly I bring thee a regression (previous -> https://github.com/oxequa/realize/issues/144, https://github.com/oxequa/realize/issues/149, https://github.com/oxequa/realize/issues/70, https://github.com/oxequa/realize/issues/154, https://github.com/oxequa/realize/issues/57).

As seen in the logs nothing happens after the first fail(in this case). It do seem to have something with watcher cycles? It's as if the test execution is forgotten.

.realize.yaml

settings:
    legacy:
        force: false
        interval: 0ms
server:
  status: true
  open: true
  port: 5002
  host: localhost
schema:
- name:api
  path: .
  commands:
    clean:
      status: true
    vet:
      status: true
      method: go vet ./...
    test:
      status: true
      method: go test ./...
    install:
      status: true
      method: dep ensure
  watcher:
    extensions:
    - go
    paths:
    - /src
    ignored_paths:
    - ./.git
    - ./.realize
    - ./vendor
    - ./node_modules
    - ./bin
    - ./.serverless

Logs:

[00:20:16][API] : Test there are some errors in : api/hello
2018/08/08 00:20:16 hello
--- FAIL: TestHandler (0.00s)
	main_test.go:14:
			Error Trace:	main_test.go:14
			Error:      	Not equal:
			            	expected: 3
			            	actual  : 0
			Test:       	TestHandler
FAIL
FAIL	api/src/hello	0.016s
exit status 1
[00:20:16][API] : Watching 4 file/s 3 folder/s
[00:20:16][API] : Install started
[00:20:17][API] : Install completed in 0.341 s
[00:20:17][API] : Build started
[00:20:18][API] : Build completed in 1.617 s
[00:20:20][API] : GO changed api/src/world/main_test.go
[00:20:20][API] : Install started
[00:20:21][API] : Install completed in 0.455 s
[00:20:21][API] : Build started
[00:20:22][API] : Build completed in 1.725 s

lalarsson avatar Aug 07 '18 15:08 lalarsson

same issue here, could this be related to the usage of go 1.1 modules?

francisdb avatar Sep 12 '18 15:09 francisdb

I'm having the same issue as https://github.com/oxequa/realize/issues/149, which is apparently related to this. The first save is the only one that triggers a reload. This issue happens with both Goland(Jetbrains) and Vim.

It seems to be related to fsnotify because it works if I set force to true under legacy:

settings:
  legacy:
    force: true

bdtomlin avatar Sep 19 '18 16:09 bdtomlin

Facing the same issue with/without 'legacy force: true'

sagarjauhari avatar Sep 21 '18 00:09 sagarjauhari

I don't think this is related to #149 because the tests don't run even if another file gets updated.

sagarjauhari avatar Sep 21 '18 00:09 sagarjauhari

Hi, any update about this?

sagarjauhari avatar Sep 25 '18 00:09 sagarjauhari

Also using go 1.11 modules and experiencing the same issue. This issue has been open almost two months without a reply so...

sethamclean avatar Sep 26 '18 15:09 sethamclean

I've created a hack of a pull request to make tests work again here. Not ideal, but it at least got them running for me. See pull request #226

jwendel avatar Nov 12 '18 04:11 jwendel

Does this work now?

micwoj92 avatar Mar 10 '21 06:03 micwoj92