Uploaded image for project: 'Apache YuniKorn'
  1. Apache YuniKorn
  2. YUNIKORN-2681

Data race in TestCheckHealthStatusNotFound

    XMLWordPrintableJSON

Details

    Description

      Data race was detected during an unit test:

      ==================
      WARNING: DATA RACE
      Write at 0x00000170c220 by goroutine 2575:
        github.com/apache/yunikorn-core/pkg/webservice.NewWebApp()
            /home/runner/work/yunikorn-core/yunikorn-core/pkg/webservice/webservice.go:82 +0x11c
        github.com/apache/yunikorn-core/pkg/webservice.TestCheckHealthStatusNotFound()
            /home/runner/work/yunikorn-core/yunikorn-core/pkg/webservice/handlers_test.go:2574 +0x2f
        testing.tRunner()
            /opt/hostedtoolcache/go/1.22.4/x64/src/testing/testing.go:1689 +0x21e
        testing.(*T).Run.gowrap1()
            /opt/hostedtoolcache/go/1.22.4/x64/src/testing/testing.go:1742 +0x44
      
      Previous read at 0x00000170c220 by goroutine 2542:
        github.com/apache/yunikorn-core/pkg/webservice.getStream()
            /home/runner/work/yunikorn-core/yunikorn-core/pkg/webservice/handlers.go:1225 +0xbd3
        github.com/apache/yunikorn-core/pkg/webservice.TestGetStream_Limit.gowrap4()
            /home/runner/work/yunikorn-core/yunikorn-core/pkg/webservice/handlers_test.go:2308 +0x4f
      
      Goroutine 2575 (running) created at:
        testing.(*T).Run()
            /opt/hostedtoolcache/go/1.22.4/x64/src/testing/testing.go:1742 +0x825
        testing.runTests.func1()
            /opt/hostedtoolcache/go/1.22.4/x64/src/testing/testing.go:2161 +0x85
        testing.tRunner()
            /opt/hostedtoolcache/go/1.22.4/x64/src/testing/testing.go:1689 +0x21e
        testing.runTests()
            /opt/hostedtoolcache/go/1.22.4/x64/src/testing/testing.go:2159 +0x8be
        testing.(*M).Run()
            /opt/hostedtoolcache/go/1.22.4/x64/src/testing/testing.go:2027 +0xf17
        main.main()
            _testmain.go:163 +0x2e4
      
      Goroutine 2542 (running) created at:
        github.com/apache/yunikorn-core/pkg/webservice.TestGetStream_Limit()
            /home/runner/work/yunikorn-core/yunikorn-core/pkg/webservice/handlers_test.go:2308 +0xbb7
        testing.tRunner()
            /opt/hostedtoolcache/go/1.22.4/x64/src/testing/testing.go:1689 +0x21e
        testing.(*T).Run.gowrap1()
            /opt/hostedtoolcache/go/1.22.4/x64/src/testing/testing.go:1742 +0x44
      ==================
      2024-06-18T13:40:54.182Z	INFO	core.events	events/event_streaming.go:164	Removing event stream consumer	{"name": "host-1", "creation time": "2024-06-18T13:40:54.181Z"}
      2024-06-18T13:40:54.182Z	INFO	core.scheduler.health	webservice/handlers.go:623	Health check is not available
      --- FAIL: TestCheckHealthStatusNotFound (0.00s)
          testing.go:1398: race detected during execution of test
      

      Attachments

        Issue Links

          Activity

            People

              pbacsko Peter Bacsko
              pbacsko Peter Bacsko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: