|
17 | 17 |
|
18 | 18 | namespace Google\Cloud\Spanner\Tests\System; |
19 | 19 |
|
20 | | -use Google\ApiCore\OperationResponse; |
21 | 20 | use Google\Cloud\Core\Exception\FailedPreconditionException; |
22 | | -use Google\Cloud\Spanner\Admin\Database\V1\DatabaseAdminClient; |
| 21 | +use Google\Cloud\Core\LongRunning\LongRunningOperation; |
| 22 | +use Google\Cloud\Spanner\Admin\Database\V1\Client\DatabaseAdminClient; |
23 | 23 | use Google\Cloud\Spanner\Admin\Database\V1\DatabaseDialect; |
24 | 24 | use Google\Cloud\Spanner\Admin\Instance\V1\InstanceAdminClient; |
25 | 25 | use Google\Cloud\Spanner\Admin\Instance\V1\InstanceConfig\Type; |
@@ -62,7 +62,7 @@ public function testInstance() |
62 | 62 | 'processingUnits' => $processingUnits, |
63 | 63 | ]); |
64 | 64 |
|
65 | | - $this->assertInstanceOf(OperationResponse::class, $op); |
| 65 | + $this->assertInstanceOf(LongRunningOperation::class, $op); |
66 | 66 | $op->pollUntilComplete(); |
67 | 67 |
|
68 | 68 | $instance = $client->instance(self::INSTANCE_NAME); |
@@ -97,9 +97,9 @@ public function testDatabase() |
97 | 97 | $dbName = uniqid(self::TESTING_PREFIX); |
98 | 98 | $op = $instance->createDatabase($dbName); |
99 | 99 |
|
100 | | - $this->assertInstanceOf(OperationResponse::class, $op); |
| 100 | + $this->assertInstanceOf(LongRunningOperation::class, $op); |
101 | 101 | $op->pollUntilComplete(); |
102 | | - $db = $op->getResult(); |
| 102 | + $db = $op->result(); |
103 | 103 | $this->assertInstanceOf(Database::class, $db); |
104 | 104 |
|
105 | 105 | self::$deletionQueue->add(function () use ($db) { |
@@ -141,9 +141,9 @@ public function testDatabaseDropProtection() |
141 | 141 | $dbName = uniqid(self::TESTING_PREFIX); |
142 | 142 | $op = $instance->createDatabase($dbName); |
143 | 143 |
|
144 | | - $this->assertInstanceOf(OperationResponse::class, $op); |
| 144 | + $this->assertInstanceOf(LongRunningOperation::class, $op); |
145 | 145 | $op->pollUntilComplete(); |
146 | | - $db = $op->getResult(); |
| 146 | + $db = $op->result(); |
147 | 147 | $this->assertInstanceOf(Database::class, $db); |
148 | 148 |
|
149 | 149 | $info = $db->reload(); |
@@ -246,7 +246,7 @@ public function testCreateCustomerManagedInstanceConfiguration() |
246 | 246 | $replicas[array_rand($replicas)]['defaultLeaderLocation'] = true; |
247 | 247 | $op = $customConfiguration->create($baseConfig, $replicas); |
248 | 248 |
|
249 | | - $this->assertInstanceOf(OperationResponse::class, $op); |
| 249 | + $this->assertInstanceOf(LongRunningOperation::class, $op); |
250 | 250 | $op->pollUntilComplete(); |
251 | 251 |
|
252 | 252 | $this->assertTrue($customConfiguration->exists()); |
@@ -332,7 +332,7 @@ public function testPgDatabase() |
332 | 332 | 'databaseDialect' => DatabaseDialect::POSTGRESQL |
333 | 333 | ]); |
334 | 334 |
|
335 | | - $this->assertInstanceOf(OperationResponse::class, $op); |
| 335 | + $this->assertInstanceOf(LongRunningOperation::class, $op); |
336 | 336 | $db = $op->pollUntilComplete(); |
337 | 337 | $this->assertInstanceOf(Database::class, $db); |
338 | 338 |
|
|
0 commit comments