You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "kellyfj (via GitHub)" <gi...@apache.org> on 2026/06/18 13:15:16 UTC

[PR] Update TestContainers and change docker depenency to moby [pulsar-client-go]

kellyfj opened a new pull request, #1513:
URL: https://github.com/apache/pulsar-client-go/pull/1513

   
   <!--
   ### Motivation
   Update dependencies - esp for docker dependency that has this CVE https://nvd.nist.gov/vuln/detail/CVE-2026-34040
   
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (yes / no)
     - The public API: (yes / no)
     - The schema: (yes / no / don't know)
     - The default values of configurations: (yes / no)
     - The wire protocol: (yes / no)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / GoDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Update TestContainers and change docker depenency to moby [pulsar-client-go]

Posted by "kellyfj (via GitHub)" <gi...@apache.org>.
kellyfj commented on PR #1513:
URL: https://github.com/apache/pulsar-client-go/pull/1513#issuecomment-4759836735

   Can someone please advise on this failing integration test? 
   Thanks
   ```
   Tests failed
   --- FAIL: TestSendBufferRetainWhenConnectionStuck (0.15s)
   doing stop standalone ...
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Update TestContainers and change docker depenency to moby [pulsar-client-go]

Posted by "kellyfj (via GitHub)" <gi...@apache.org>.
kellyfj commented on PR #1513:
URL: https://github.com/apache/pulsar-client-go/pull/1513#issuecomment-4783413075

   The issue is a data race in the mockConn.WriteData() method. The test's assert.Eventually is reading from conn.buffers without holding the lock, while the producer goroutine is writing to it with the lock.
   
   The fix is to protect both the write and the read with the mutex. So 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Update TestContainers and change docker depenency to moby [pulsar-client-go]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #1513:
URL: https://github.com/apache/pulsar-client-go/pull/1513#discussion_r3449549838


##########
pulsar/consumer_zero_queue_test.go:
##########
@@ -250,9 +254,12 @@ func TestReconnectedBrokerSendPermits(t *testing.T) {
 		ExposedPorts: []string{"6650/tcp", "8080/tcp"},
 		WaitingFor:   wait.ForExposedPort(),
 		HostConfigModifier: func(config *container.HostConfig) {
-			config.PortBindings = map[nat.Port][]nat.PortBinding{
-				"6650/tcp": {{HostIP: "0.0.0.0", HostPort: "6659"}},
-				"8080/tcp": {{HostIP: "0.0.0.0", HostPort: "8089"}},
+			ip := netip.MustParseAddr("0.0.0.0")
+			p6650, _ := network.ParsePort("6650/tcp")
+			p8080, _ := network.ParsePort("8080/tcp")
+			config.PortBindings = network.PortMap{
+				p6650: {{HostIP: ip, HostPort: "6659"}},
+				p8080: {{HostIP: ip, HostPort: "8089"}},
 			}

Review Comment:
   `network.ParsePort` errors are currently ignored; if parsing fails, the resulting zero-value port key can lead to incorrect/missing port bindings and flaky failures. Please check the returned error here as well (and avoid `MustParseAddr` if you want to eliminate potential panics).



##########
pulsar/consumer_zero_queue_test.go:
##########
@@ -133,9 +134,12 @@ func TestReconnectConsumer(t *testing.T) {
 		ExposedPorts: []string{"6650/tcp", "8080/tcp"},
 		WaitingFor:   wait.ForExposedPort(),
 		HostConfigModifier: func(config *container.HostConfig) {
-			config.PortBindings = map[nat.Port][]nat.PortBinding{
-				"6650/tcp": {{HostIP: "0.0.0.0", HostPort: "6659"}},
-				"8080/tcp": {{HostIP: "0.0.0.0", HostPort: "8089"}},
+			ip := netip.MustParseAddr("0.0.0.0")
+			p6650, _ := network.ParsePort("6650/tcp")
+			p8080, _ := network.ParsePort("8080/tcp")
+			config.PortBindings = network.PortMap{
+				p6650: {{HostIP: ip, HostPort: "6659"}},
+				p8080: {{HostIP: ip, HostPort: "8089"}},
 			}

Review Comment:
   `network.ParsePort` returns an error; ignoring it means a parse failure will silently use a zero-value port key in the `PortMap`, potentially resulting in missing/incorrect port bindings and hard-to-debug test failures. Please assert the parse succeeds (and consider using `netip.IPv4Unspecified()` to avoid a panic).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Update TestContainers and change docker depenency to moby [pulsar-client-go]

Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece merged PR #1513:
URL: https://github.com/apache/pulsar-client-go/pull/1513


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org