Skip to content

Commit 45e0d61

Browse files
authored
test: use ip address instead of localhost (#713)
1 parent 0546d8f commit 45e0d61

11 files changed

Lines changed: 15 additions & 13 deletions

File tree

.github/workflows/run-test-suite.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ jobs:
9595

9696
- name: Run tests
9797
run: ${{ inputs.test-command }}
98+
env:
99+
XDEBUG_MODE: off
98100

99101
- name: Check for failures
100102
if: steps.validate.outcome == 'failure'

testing/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ workflow has a timer, the server doesn't wait for it and continues immediately.
139139
this behaviour you can use `TestService` class:
140140

141141
```php
142-
$testService = TestService::create('localhost:7233');
142+
$testService = TestService::create('127.0.0.1:7233');
143143
$testService->lockTimeSkipping();
144144

145145
// ...
@@ -217,7 +217,7 @@ final class SimpleWorkflowTestCase extends TestCase
217217
218218
protected function setUp(): void
219219
{
220-
$this->workflowClient = new WorkflowClient(ServiceClient::create('localhost:7233'));
220+
$this->workflowClient = new WorkflowClient(ServiceClient::create('127.0.0.1:7233'));
221221
$this->activityMocks = new ActivityMocker();
222222
223223
parent::setUp();

tests/.rr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ server:
1010

1111
# Workflow and activity mesh service
1212
temporal:
13-
address: "localhost:7233"
13+
address: "127.0.0.1:7233"
1414
activities:
1515
num_workers: 4
1616
debug_level: 2

tests/Acceptance/.rr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ server:
77

88
# Workflow and activity mesh service
99
temporal:
10-
address: ${TEMPORAL_ADDRESS:-localhost:7233}
10+
address: ${TEMPORAL_ADDRESS:-127.0.0.1:7233}
1111
namespace: ${TEMPORAL_NAMESPACE:-default}
1212
activities:
1313
num_workers: 2
@@ -18,4 +18,4 @@ kv:
1818
config: { }
1919

2020
logs:
21-
mode: none
21+
mode: none #info

tests/Functional/.rr.silent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ server:
88

99
# Workflow and activity mesh service
1010
temporal:
11-
address: "localhost:7233"
11+
address: "127.0.0.1:7233"
1212
activities:
1313
num_workers: 1
1414

tests/Functional/Client/AbstractClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ abstract class AbstractClient extends AbstractFunctional
2828
* @param string $connection
2929
* @return WorkflowClient
3030
*/
31-
protected function createClient(string $connection = 'localhost:7233'): WorkflowClient
31+
protected function createClient(string $connection = '127.0.0.1:7233'): WorkflowClient
3232
{
3333
return new WorkflowClient(
3434
ServiceClient::create($connection)

tests/Functional/Client/TypedStubTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ public function testGetDTOResult()
130130

131131
public function testVoidReturnType()
132132
{
133-
$w = $this->createClient();
134-
$dto = $w->newWorkflowStub(ActivityReturnTypeWorkflow::class);
133+
$client = $this->createClient();
134+
$dto = $client->newWorkflowStub(ActivityReturnTypeWorkflow::class);
135135

136136
$this->assertEquals(
137137
100,

tests/Functional/HistoryLengthWorkflowTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ final class HistoryLengthWorkflowTestCase extends TestCase
1818
protected function setUp(): void
1919
{
2020
$this->workflowClient = new WorkflowClient(
21-
ServiceClient::create('localhost:7233')
21+
ServiceClient::create('127.0.0.1:7233')
2222
);
2323
$this->activityMocks = new ActivityMocker();
2424

tests/Functional/Interceptor/AbstractClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ abstract class AbstractClient extends AbstractFunctional
2626
* @param string $connection
2727
* @return WorkflowClient
2828
*/
29-
protected function createClient(string $connection = 'localhost:7233'): WorkflowClient
29+
protected function createClient(string $connection = '127.0.0.1:7233'): WorkflowClient
3030
{
3131
return new WorkflowClient(
3232
ServiceClient::create($connection),

tests/Functional/NamedArgumentsTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class NamedArgumentsTestCase extends TestCase
2323
protected function setUp(): void
2424
{
2525
$this->workflowClient = new WorkflowClient(
26-
ServiceClient::create('localhost:7233')
26+
ServiceClient::create('127.0.0.1:7233')
2727
);
2828

2929
parent::setUp();

0 commit comments

Comments
 (0)