Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make test fails, gradle can't ID java version #47

Open
rmloveland opened this issue May 17, 2018 · 2 comments
Open

make test fails, gradle can't ID java version #47

rmloveland opened this issue May 17, 2018 · 2 comments

Comments

@rmloveland
Copy link

I have Gradle 4.7 installed on OS X via brew install gradle.

Output of java -version is

java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

Testing output is below. Strangely, it kept running after the java test failure for ~190 seconds (!) if I'm reading it correctly.

make test
go test -v -i ./testing
github.com/cockroachdb/examples-orms/go/gorm/model
github.com/cockroachdb/examples-orms/vendor/github.com/lib/pq/oid
github.com/cockroachdb/examples-orms/vendor/github.com/pkg/errors
github.com/cockroachdb/examples-orms/vendor/github.com/lib/pq
github.com/cockroachdb/examples-orms/vendor/github.com/cockroachdb/cockroach-go/testserver
go test -v -run "." ./testing 
=== RUN   TestGORM
2018/05/17 14:48:14 GET https://edge-binaries.cockroachdb.com/cockroach/cockroach.darwin-amd64.LATEST
2018/05/17 14:48:14 saving https://edge-binaries.cockroachdb.com/cockroach/cockroach.darwin-amd64.6d0c09aee9ff49ff0e6ba09bac86f5da90f9b63c to /var/folders/dc/78f3lsy51h5gxhvzrcf1hsmm0000gn/T/cockroach.darwin-amd64.6d0c09aee9ff49ff0e6ba09bac86f5da90f9b63c, this may take some time
2018/05/17 14:48:18 Using automatically-downloaded binary: /var/folders/dc/78f3lsy51h5gxhvzrcf1hsmm0000gn/T/cockroach.darwin-amd64.6d0c09aee9ff49ff0e6ba09bac86f5da90f9b63c
2018/05/17 14:48:18 process 63701 started: /var/folders/dc/78f3lsy51h5gxhvzrcf1hsmm0000gn/T/cockroach.darwin-amd64.6d0c09aee9ff49ff0e6ba09bac86f5da90f9b63c start --logtostderr --insecure --host=localhost --port=0 --http-port=0 --store=/tmp/cockroach-testserver493513716 --listening-url-file=/tmp/cockroach-testserver493513716/listen-url
=== RUN   TestGORM/FirstRun
=== RUN   TestGORM/FirstRun/GeneratedTables
=== RUN   TestGORM/FirstRun/GeneratedColumns
=== RUN   TestGORM/FirstRun/GeneratedColumns/OrdersTable
=== PAUSE TestGORM/FirstRun/GeneratedColumns/OrdersTable
=== RUN   TestGORM/FirstRun/GeneratedColumns/OrderProductsTable
=== PAUSE TestGORM/FirstRun/GeneratedColumns/OrderProductsTable
=== RUN   TestGORM/FirstRun/GeneratedColumns/CustomersTable
=== PAUSE TestGORM/FirstRun/GeneratedColumns/CustomersTable
=== RUN   TestGORM/FirstRun/GeneratedColumns/ProductsTable
=== PAUSE TestGORM/FirstRun/GeneratedColumns/ProductsTable
=== CONT  TestGORM/FirstRun/GeneratedColumns/OrdersTable
=== CONT  TestGORM/FirstRun/GeneratedColumns/CustomersTable
=== CONT  TestGORM/FirstRun/GeneratedColumns/ProductsTable
=== CONT  TestGORM/FirstRun/GeneratedColumns/OrderProductsTable
=== RUN   TestGORM/FirstRun/EmptyTables
=== RUN   TestGORM/FirstRun/EmptyTables/CustomersTable
=== PAUSE TestGORM/FirstRun/EmptyTables/CustomersTable
=== RUN   TestGORM/FirstRun/EmptyTables/ProductsTable
=== PAUSE TestGORM/FirstRun/EmptyTables/ProductsTable
=== RUN   TestGORM/FirstRun/EmptyTables/OrdersTable
=== PAUSE TestGORM/FirstRun/EmptyTables/OrdersTable
=== RUN   TestGORM/FirstRun/EmptyTables/OrderProductsTable
=== PAUSE TestGORM/FirstRun/EmptyTables/OrderProductsTable
=== CONT  TestGORM/FirstRun/EmptyTables/CustomersTable
=== CONT  TestGORM/FirstRun/EmptyTables/OrderProductsTable
=== CONT  TestGORM/FirstRun/EmptyTables/OrdersTable
=== CONT  TestGORM/FirstRun/EmptyTables/ProductsTable
=== RUN   TestGORM/FirstRun/RetrieveFromAPIBeforeCreation
=== RUN   TestGORM/FirstRun/RetrieveFromAPIBeforeCreation/Customers
=== PAUSE TestGORM/FirstRun/RetrieveFromAPIBeforeCreation/Customers
=== RUN   TestGORM/FirstRun/RetrieveFromAPIBeforeCreation/Products
=== PAUSE TestGORM/FirstRun/RetrieveFromAPIBeforeCreation/Products
=== RUN   TestGORM/FirstRun/RetrieveFromAPIBeforeCreation/Orders
=== PAUSE TestGORM/FirstRun/RetrieveFromAPIBeforeCreation/Orders
=== CONT  TestGORM/FirstRun/RetrieveFromAPIBeforeCreation/Customers
=== CONT  TestGORM/FirstRun/RetrieveFromAPIBeforeCreation/Orders
=== CONT  TestGORM/FirstRun/RetrieveFromAPIBeforeCreation/Products
=== RUN   TestGORM/FirstRun/CreateCustomer
=== RUN   TestGORM/FirstRun/CreateProduct
=== RUN   TestGORM/FirstRun/RetrieveFromAPIAfterInitialCreation
=== RUN   TestGORM/FirstRun/RetrieveFromAPIAfterInitialCreation/Customers
=== PAUSE TestGORM/FirstRun/RetrieveFromAPIAfterInitialCreation/Customers
=== RUN   TestGORM/FirstRun/RetrieveFromAPIAfterInitialCreation/Products
=== PAUSE TestGORM/FirstRun/RetrieveFromAPIAfterInitialCreation/Products
=== CONT  TestGORM/FirstRun/RetrieveFromAPIAfterInitialCreation/Customers
=== CONT  TestGORM/FirstRun/RetrieveFromAPIAfterInitialCreation/Products
=== RUN   TestGORM/FirstRun/CreateOrder
=== RUN   TestGORM/FirstRun/RetrieveFromAPIAfterDependentCreation
=== RUN   TestGORM/FirstRun/RetrieveFromAPIAfterDependentCreation/Order
=== PAUSE TestGORM/FirstRun/RetrieveFromAPIAfterDependentCreation/Order
=== CONT  TestGORM/FirstRun/RetrieveFromAPIAfterDependentCreation/Order
2018/05/17 14:48:19 waiting for app server port to become available
=== RUN   TestGORM/SecondRun
=== RUN   TestGORM/SecondRun/RetrieveFromAPIAfterRestart
=== RUN   TestGORM/SecondRun/RetrieveFromAPIAfterRestart/Customers
=== PAUSE TestGORM/SecondRun/RetrieveFromAPIAfterRestart/Customers
=== RUN   TestGORM/SecondRun/RetrieveFromAPIAfterRestart/Products
=== PAUSE TestGORM/SecondRun/RetrieveFromAPIAfterRestart/Products
=== RUN   TestGORM/SecondRun/RetrieveFromAPIAfterRestart/Order
=== PAUSE TestGORM/SecondRun/RetrieveFromAPIAfterRestart/Order
=== CONT  TestGORM/SecondRun/RetrieveFromAPIAfterRestart/Customers
=== CONT  TestGORM/SecondRun/RetrieveFromAPIAfterRestart/Order
=== CONT  TestGORM/SecondRun/RetrieveFromAPIAfterRestart/Products
2018/05/17 14:48:21 waiting for app server port to become available
--- PASS: TestGORM (7.99s)
    --- PASS: TestGORM/FirstRun (2.33s)
        --- PASS: TestGORM/FirstRun/GeneratedTables (0.00s)
        --- PASS: TestGORM/FirstRun/GeneratedColumns (0.00s)
            --- PASS: TestGORM/FirstRun/GeneratedColumns/OrdersTable (0.00s)
            --- PASS: TestGORM/FirstRun/GeneratedColumns/CustomersTable (0.01s)
            --- PASS: TestGORM/FirstRun/GeneratedColumns/ProductsTable (0.01s)
            --- PASS: TestGORM/FirstRun/GeneratedColumns/OrderProductsTable (0.01s)
        --- PASS: TestGORM/FirstRun/EmptyTables (0.00s)
            --- PASS: TestGORM/FirstRun/EmptyTables/ProductsTable (0.00s)
            --- PASS: TestGORM/FirstRun/EmptyTables/OrderProductsTable (0.00s)
            --- PASS: TestGORM/FirstRun/EmptyTables/CustomersTable (0.00s)
            --- PASS: TestGORM/FirstRun/EmptyTables/OrdersTable (0.00s)
        --- PASS: TestGORM/FirstRun/RetrieveFromAPIBeforeCreation (0.00s)
            --- PASS: TestGORM/FirstRun/RetrieveFromAPIBeforeCreation/Orders (0.01s)
            --- PASS: TestGORM/FirstRun/RetrieveFromAPIBeforeCreation/Products (0.01s)
            --- PASS: TestGORM/FirstRun/RetrieveFromAPIBeforeCreation/Customers (0.01s)
        --- PASS: TestGORM/FirstRun/CreateCustomer (0.01s)
        --- PASS: TestGORM/FirstRun/CreateProduct (0.00s)
        --- PASS: TestGORM/FirstRun/RetrieveFromAPIAfterInitialCreation (0.00s)
            --- PASS: TestGORM/FirstRun/RetrieveFromAPIAfterInitialCreation/Customers (0.00s)
            --- PASS: TestGORM/FirstRun/RetrieveFromAPIAfterInitialCreation/Products (0.00s)
        --- PASS: TestGORM/FirstRun/CreateOrder (0.01s)
        --- PASS: TestGORM/FirstRun/RetrieveFromAPIAfterDependentCreation (0.00s)
            --- PASS: TestGORM/FirstRun/RetrieveFromAPIAfterDependentCreation/Order (0.00s)
    --- PASS: TestGORM/SecondRun (1.27s)
        --- PASS: TestGORM/SecondRun/RetrieveFromAPIAfterRestart (0.00s)
            --- PASS: TestGORM/SecondRun/RetrieveFromAPIAfterRestart/Customers (0.00s)
            --- PASS: TestGORM/SecondRun/RetrieveFromAPIAfterRestart/Products (0.00s)
            --- PASS: TestGORM/SecondRun/RetrieveFromAPIAfterRestart/Order (0.00s)
=== RUN   TestHibernate
2018/05/17 14:48:22 GET https://edge-binaries.cockroachdb.com/cockroach/cockroach.darwin-amd64.LATEST
2018/05/17 14:48:22 Process 63701 exited with status -1
2018/05/17 14:48:22 signal: killed
2018/05/17 14:48:22 Using automatically-downloaded binary: /var/folders/dc/78f3lsy51h5gxhvzrcf1hsmm0000gn/T/cockroach.darwin-amd64.6d0c09aee9ff49ff0e6ba09bac86f5da90f9b63c
2018/05/17 14:48:22 process 63739 started: /var/folders/dc/78f3lsy51h5gxhvzrcf1hsmm0000gn/T/cockroach.darwin-amd64.6d0c09aee9ff49ff0e6ba09bac86f5da90f9b63c start --logtostderr --insecure --host=localhost --port=0 --http-port=0 --store=/tmp/cockroach-testserver436594883 --listening-url-file=/tmp/cockroach-testserver436594883/listen-url
=== RUN   TestHibernate/FirstRun

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '10.0.1'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
make[1]: *** [start] Error 1
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=0x129deba]

goroutine 145 [running]:
testing.tRunner.func1(0xc42013c4b0)
	/usr/local/Cellar/go/1.10/libexec/src/testing/testing.go:742 +0x29d
panic(0x12ee340, 0x14fe2f0)
	/usr/local/Cellar/go/1.10/libexec/src/runtime/panic.go:505 +0x229
os.(*ProcessState).Pid(...)
	/usr/local/Cellar/go/1.10/libexec/src/os/exec_posix.go:66
github.com/cockroachdb/examples-orms/testing.initORMApp(0x134d2bb, 0x4, 0x134ea1f, 0x9, 0xc420180300, 0xc42013e2d0, 0x10d7c4d, 0x1421ba8)
	/Users/rloveland/go/src/github.com/cockroachdb/examples-orms/testing/main_test.go:132 +0x33a
github.com/cockroachdb/examples-orms/testing.testORM.func1(0xc42013c4b0)
	/Users/rloveland/go/src/github.com/cockroachdb/examples-orms/testing/main_test.go:158 +0x6b
testing.tRunner(0xc42013c4b0, 0xc420166410)
	/usr/local/Cellar/go/1.10/libexec/src/testing/testing.go:777 +0xd0
created by testing.(*T).Run
	/usr/local/Cellar/go/1.10/libexec/src/testing/testing.go:824 +0x2e0
FAIL	github.com/cockroachdb/examples-orms/testing	191.080s
make: *** [test] Error 1
@asubiotto
Copy link
Contributor

I'm having the same issue cc @rafiss

@rafiss
Copy link
Contributor

rafiss commented Jun 24, 2020

Thanks for the issue. The examples-orms docker builder image uses Java 8, so it should work with Java 8. But I think the right direction would be to update examples-orms to use Java 11 (the current LTS release of Java). I believe that would fix this problem.

In the meantime, if you want to test locally, it should work with make dockertest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants