Code Monkey home page Code Monkey logo

Comments (6)

dolmen avatar dolmen commented on June 11, 2024

@linusbarth Could you fix this? I suppose it is related to #1471.

from testify.

linusbarth avatar linusbarth commented on June 11, 2024

I'm not sure why your pull request fixes this. But I needed some time to even notice that not the test fails but rather this is just output from an internal test.

If I run the test (go test -v -race -run TestSubtestPanic -failfast ./suite) on the branch from your 1502-PR, I see no difference in output. Is this correct?

Also wouldn't it be better to somehow manipulate/mark/remove the output from the internal tests? (If that's even possible)

from testify.

dolmen avatar dolmen commented on June 11, 2024

@linusbarth #1502 is just a fix for an issue I found thanks to your mistake, but is NOT the fix for 1501. #1503 IS the fix.

from testify.

dolmen avatar dolmen commented on June 11, 2024

Well. I think that we need both #1502 and #1503. So I will just rebase #1503 on top of #1502.

from testify.

dolmen avatar dolmen commented on June 11, 2024

We have another test failure in suite:

$ go test -run TestSuiteWithStats -failfast -parallel 1 -count=1 ./suite
--- FAIL: WithStats (0.00s)
    --- FAIL: WithStats/TestPanic (0.00s)
        suite.go:87: test panicked: oops
            goroutine 21 [running]:
            runtime/debug.Stack()
            	/usr/local/Cellar/go/1.21.3/libexec/src/runtime/debug/stack.go:24 +0x5e
            github.com/stretchr/testify/suite.failOnPanic(0xc000134340, {0x13ef4a0, 0x14f7f10})
            	/Users/omengue/go/src/github.com/stretchr/testify/suite/suite.go:87 +0x39
            github.com/stretchr/testify/suite.Run.func1.1()
            	/Users/omengue/go/src/github.com/stretchr/testify/suite/suite.go:184 +0x24c
            panic({0x13ef4a0?, 0x14f7f10?})
            	/usr/local/Cellar/go/1.21.3/libexec/src/runtime/panic.go:914 +0x21f
            github.com/stretchr/testify/suite.(*suiteWithStats).TestPanic(0x0?)
            	/Users/omengue/go/src/github.com/stretchr/testify/suite/suite_test.go:549 +0x25
            reflect.Value.call({0xc0000f9e00?, 0xc00009b008?, 0x13?}, {0x146993b, 0x4}, {0xc00004be70, 0x1, 0x1?})
            	/usr/local/Cellar/go/1.21.3/libexec/src/reflect/value.go:596 +0xce7
            reflect.Value.Call({0xc0000f9e00?, 0xc00009b008?, 0x13d1b2f?}, {0xc000036670?, 0x11180cd?, 0x16d2098?})
            	/usr/local/Cellar/go/1.21.3/libexec/src/reflect/value.go:380 +0xb9
            github.com/stretchr/testify/suite.Run.func1(0xc000134340)
            	/Users/omengue/go/src/github.com/stretchr/testify/suite/suite.go:198 +0x467
            testing.tRunner(0xc000134340, 0xc00012e090)
            	/usr/local/Cellar/go/1.21.3/libexec/src/testing/testing.go:1595 +0xff
            created by testing.(*T).Run in goroutine 20
            	/usr/local/Cellar/go/1.21.3/libexec/src/testing/testing.go:1648 +0x3ad
--- FAIL: TestSuiteWithStats (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x131fd22]

goroutine 19 [running]:
testing.tRunner.func1.2({0x1409f20, 0x17a5c80})
	/usr/local/Cellar/go/1.21.3/libexec/src/testing/testing.go:1545 +0x238
testing.tRunner.func1()
	/usr/local/Cellar/go/1.21.3/libexec/src/testing/testing.go:1548 +0x397
panic({0x1409f20?, 0x17a5c80?})
	/usr/local/Cellar/go/1.21.3/libexec/src/runtime/panic.go:914 +0x21f
github.com/stretchr/testify/suite.TestSuiteWithStats(0x0?)
	/Users/omengue/go/src/github.com/stretchr/testify/suite/suite_test.go:571 +0x242
testing.tRunner(0xc0000831e0, 0x149d878)
	/usr/local/Cellar/go/1.21.3/libexec/src/testing/testing.go:1595 +0xff
created by testing.(*T).Run in goroutine 1
	/usr/local/Cellar/go/1.21.3/libexec/src/testing/testing.go:1648 +0x3ad
FAIL	github.com/stretchr/testify/suite	0.648s
FAIL

from testify.

dolmen avatar dolmen commented on June 11, 2024

#1503 didn't work. TestSubtestPanic wasn't the only test to have issues.

#1504 is (hopefully) the real fix: use consistent subtest-like names for subtests when running them via testing.InternalTest and testing.RunTests.

from testify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.