Skip to content

Commit 2439c36

Browse files
authored
Develop (#1)
* Add env var to supress missing credentials warning * Do not delete topic when last message pop
1 parent 5c22fdf commit 2439c36

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

src/PubSubQueue.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ public function pop($queue = null)
133133
);
134134
} else {
135135
$subscription->delete();
136-
$topic->delete();
137136
}
138137
}
139138

tests/Unit/Connectors/PubSubConnectorTests.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class PubSubConnectorTests extends TestCase
1212
{
1313
public function testImplementsConnectorInterface()
1414
{
15+
putenv('SUPPRESS_GCLOUD_CREDS_WARNING=true');
1516
$reflection = new ReflectionClass(PubSubConnector::class);
1617
$this->assertTrue($reflection->implementsInterface(ConnectorInterface::class));
1718
}

tests/Unit/PubSubQueueTests.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,6 @@ public function testPopWhenNoJobAvailable()
135135
$this->topic->method('exists')
136136
->willReturn(true);
137137

138-
$this->topic->expects($this->once())
139-
->method('delete');
140-
141138
$this->queue->method('getTopic')
142139
->willReturn($this->topic);
143140

0 commit comments

Comments
 (0)