Skip to content

Commit d46aa1f

Browse files
committed
More debug logs
1 parent 3b28de7 commit d46aa1f

File tree

4 files changed

+56
-11
lines changed

4 files changed

+56
-11
lines changed

src/bridge/filesystem/async-aws/tests/Flow/Filesystem/Bridge/AsyncAWS/Tests/Integration/AsyncAWSS3DestinationStreamTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public function test_closing_empty_stream() : void
1616
self::assertTrue($stream->isOpen());
1717
$stream->close();
1818
self::assertFalse($stream->isOpen());
19+
20+
echo "Test Finished " . __METHOD__;
1921
}
2022

2123
public function test_writing_content_from_resource() : void
@@ -31,6 +33,8 @@ public function test_writing_content_from_resource() : void
3133
self::assertSame(\file_get_contents(__DIR__ . '/Fixtures/orders.csv'), $fs->readFrom(path('aws-s3://orders.csv'))->content());
3234

3335
$fs->rm(path('aws-s3://orders.csv'));
36+
37+
echo "Test Finished " . __METHOD__;
3438
}
3539

3640
public function test_writing_content_smaller_than_block_size_to_s3() : void
@@ -46,5 +50,7 @@ public function test_writing_content_smaller_than_block_size_to_s3() : void
4650
self::assertSame('Hello, World!', $fs->readFrom(path('aws-s3://file.txt'))->content());
4751

4852
$fs->rm(path('aws-s3://file.txt'));
53+
54+
echo "Test Finished " . __METHOD__;
4955
}
5056
}

src/bridge/filesystem/async-aws/tests/Flow/Filesystem/Bridge/AsyncAWS/Tests/Integration/AsyncAWSS3FilesystemTest.php

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public function test_appending_to_existing_5mb_blob() : void
2929
self::assertStringEndsWith("This is second line\n", $fs->readFrom(path('aws-s3://var/file.txt'))->read(58, 1024 * 1024 * 5));
3030

3131
$fs->rm(path('aws-s3://var/file.txt'));
32+
33+
echo "Test Finished " . __METHOD__;
3234
}
3335

3436
public function test_appending_to_existing_blob() : void
@@ -56,6 +58,8 @@ public function test_appending_to_existing_blob() : void
5658
);
5759

5860
$fs->rm(path('aws-s3://var/file.txt'));
61+
62+
echo "Test Finished " . __METHOD__;
5963
}
6064

6165
public function test_file_status_on_existing_file() : void
@@ -78,6 +82,8 @@ public function test_file_status_on_existing_folder() : void
7882

7983
self::assertTrue($fs->status(path('aws-s3://var/nested'))->isDirectory());
8084
self::assertTrue($fs->status(path('aws-s3://var/nested/'))->isDirectory());
85+
86+
echo "Test Finished " . __METHOD__;
8187
}
8288

8389
public function test_file_status_on_non_existing_file() : void
@@ -92,13 +98,17 @@ public function test_file_status_on_non_existing_folder() : void
9298
$fs = aws_s3_filesystem($this->bucket(), $this->s3Client());
9399

94100
self::assertNull($fs->status(path('aws-s3://var/non-existing-folder/')));
101+
102+
echo "Test Finished " . __METHOD__;
95103
}
96104

97105
public function test_file_status_on_non_existing_pattern() : void
98106
{
99107
$fs = aws_s3_filesystem($this->bucket(), $this->s3Client());
100108

101109
self::assertNull($fs->status(path('aws-s3://var/non-existing-folder/*')));
110+
111+
echo "Test Finished " . __METHOD__;
102112
}
103113

104114
public function test_file_status_on_partial_path() : void
@@ -109,6 +119,8 @@ public function test_file_status_on_partial_path() : void
109119
$stream->close();
110120

111121
self::assertNull($fs->status(path('aws-s3://var/some_path')));
122+
123+
echo "Test Finished " . __METHOD__;
112124
}
113125

114126
public function test_file_status_on_pattern() : void
@@ -123,13 +135,17 @@ public function test_file_status_on_pattern() : void
123135
'aws-s3://var/some_path_to/file.txt',
124136
$fs->status(path('aws-s3://var/some_path_to/*.txt'))->path->uri()
125137
);
138+
139+
echo "Test Finished " . __METHOD__;
126140
}
127141

128142
public function test_file_status_on_root_folder() : void
129143
{
130144
$fs = aws_s3_filesystem($this->bucket(), $this->s3Client());
131145

132146
self::assertTrue($fs->status(path('aws-s3:///'))->isDirectory());
147+
148+
echo "Test Finished " . __METHOD__;
133149
}
134150

135151
public function test_move_blob() : void
@@ -142,6 +158,8 @@ public function test_move_blob() : void
142158

143159
self::assertNull($fs->status(path('aws-s3://var/file.txt')));
144160
self::assertSame('Hello, World!', $fs->readFrom(path('aws-s3://var/file_mv.txt'))->content());
161+
162+
echo "Test Finished " . __METHOD__;
145163
}
146164

147165
public function test_not_removing_a_content_when_its_not_a_full_folder_path_pattern() : void
@@ -156,6 +174,8 @@ public function test_not_removing_a_content_when_its_not_a_full_folder_path_patt
156174
self::assertTrue($fs->status(path('aws-s3://var/nested/orders/orders_01.csv'))->isFile());
157175

158176
self::assertFalse($fs->rm(path('aws-s3://var/nested/orders/ord')));
177+
178+
echo "Test Finished " . __METHOD__;
159179
}
160180

161181
public function test_remove_file_when_exists() : void
@@ -170,6 +190,8 @@ public function test_remove_file_when_exists() : void
170190

171191
self::assertTrue($fs->rm($stream->path()));
172192
self::assertNull($fs->status($stream->path()));
193+
194+
echo "Test Finished " . __METHOD__;
173195
}
174196

175197
public function test_remove_pattern() : void
@@ -189,6 +211,8 @@ public function test_remove_pattern() : void
189211
self::assertTrue($fs->status(path('aws-s3://var/flow-fs-test-directory/'))->isDirectory());
190212
self::assertNull($fs->status(path('aws-s3://var/flow-fs-test-directory/remove_file_when_exists.txt')));
191213
$fs->rm(path('aws-s3://var/flow-fs-test-directory/'));
214+
215+
echo "Test Finished " . __METHOD__;
192216
}
193217

194218
public function test_removing_folder() : void
@@ -207,6 +231,8 @@ public function test_removing_folder() : void
207231
self::assertTrue($fs->status(path('aws-s3://var/orders.csv'))->isFile());
208232
self::assertNull($fs->status(path('aws-s3://var/nested/orders/orders.csv')));
209233
self::assertNull($fs->status(path('aws-s3://var/nested/orders/orders_01.csv')));
234+
235+
echo "Test Finished " . __METHOD__;
210236
}
211237

212238
public function test_removing_folder_pattern() : void
@@ -225,6 +251,8 @@ public function test_removing_folder_pattern() : void
225251
self::assertTrue($fs->status(path('aws-s3://var/nested/orders/orders.txt'))->isFile());
226252
self::assertNull($fs->status(path('aws-s3://var/nested/orders/orders.csv')));
227253
self::assertNull($fs->status(path('aws-s3://var/nested/orders/orders_01.csv')));
254+
255+
echo "Test Finished " . __METHOD__;
228256
}
229257

230258
public function test_that_scan_sort_files_by_path_names() : void
@@ -261,20 +289,26 @@ public function test_that_scan_sort_files_by_path_names() : void
261289
],
262290
$paths
263291
);
292+
293+
echo "Test Finished " . __METHOD__;
264294
}
265295

266296
public function test_tmp_dir() : void
267297
{
268298
$fs = aws_s3_filesystem($this->bucket(), $this->s3Client());
269299

270300
self::assertSame('aws-s3://_$azure_flow_tmp$/', $fs->getSystemTmpDir()->uri());
301+
302+
echo "Test Finished " . __METHOD__;
271303
}
272304

273305
public function test_tmp_dir_status() : void
274306
{
275307
$fs = aws_s3_filesystem($this->bucket(), $this->s3Client());
276308

277309
self::assertTrue($fs->status($fs->getSystemTmpDir())->isDirectory());
310+
311+
echo "Test Finished " . __METHOD__;
278312
}
279313

280314
public function test_write_to_tmp_dir() : void
@@ -289,6 +323,8 @@ public function test_write_to_tmp_dir() : void
289323
self::assertSame('Hello, World!', $fs->readFrom($filePath)->content());
290324

291325
$fs->rm($filePath);
326+
327+
echo "Test Finished " . __METHOD__;
292328
}
293329

294330
public function test_write_to_tmp_dir_as_to_a_file() : void
@@ -298,6 +334,8 @@ public function test_write_to_tmp_dir_as_to_a_file() : void
298334
$this->expectExceptionMessage('Cannot write to system tmp directory');
299335

300336
$fs->writeTo($fs->getSystemTmpDir());
337+
338+
echo "Test Finished " . __METHOD__;
301339
}
302340

303341
public function test_writing_to_aws_s3_storage() : void
@@ -313,6 +351,8 @@ public function test_writing_to_aws_s3_storage() : void
313351
self::assertSame('Hello, World!', $fs->readFrom(path('aws-s3://file.txt'))->content());
314352

315353
$fs->rm(path('aws-s3://file.txt'));
354+
355+
echo "Test Finished " . __METHOD__;
316356
}
317357

318358
public function test_writing_to_to_aws_s3_from_resources() : void
@@ -328,6 +368,8 @@ public function test_writing_to_to_aws_s3_from_resources() : void
328368
self::assertSame(\file_get_contents(__DIR__ . '/Fixtures/orders.csv'), $fs->readFrom(path('aws-s3://orders.csv'))->content());
329369

330370
$fs->rm(path('aws-s3://orders.csv'));
371+
372+
echo "Test Finished " . __METHOD__;
331373
}
332374

333375
public function test_writing_to_to_s3_using_blocks() : void
@@ -348,5 +390,7 @@ public function test_writing_to_to_s3_using_blocks() : void
348390
self::assertFalse($fs->status(path('aws-s3://block_blob.csv'))->isDirectory());
349391

350392
$fs->rm(path('aws-s3://block_blob.csv'));
393+
394+
echo "Test Finished " . __METHOD__;
351395
}
352396
}

src/bridge/filesystem/async-aws/tests/Flow/Filesystem/Bridge/AsyncAWS/Tests/Integration/AsyncAWSS3SourceStreamTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public function test_iterating_through_blob() : void
3535
self::assertSame($content, \implode('', \iterator_to_array($stream->iterate())));
3636

3737
$stream->close();
38+
39+
echo "Test Finished " . __METHOD__;
3840
}
3941

4042
public function test_reading_from_blob_by_limit_and_offset() : void
@@ -58,6 +60,8 @@ public function test_reading_from_blob_by_limit_and_offset() : void
5860
self::assertSame(33, \strlen($stream->read(33, 29)));
5961

6062
$stream->close();
63+
64+
echo "Test Finished " . __METHOD__;
6165
}
6266

6367
#[DataProvider('line_lengths')]
@@ -84,5 +88,7 @@ public function test_reading_lines_from_blob(int $lineLength) : void
8488
self::assertNull($lines->current());
8589

8690
$stream->close();
91+
92+
echo "Test Finished " . __METHOD__;
8793
}
8894
}

src/bridge/filesystem/async-aws/tests/Flow/Filesystem/Bridge/AsyncAWS/Tests/Integration/AsyncAWSS3TestCase.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,6 @@ public function bucket() : string
4444

4545
public function s3Client() : S3Client
4646
{
47-
var_dump(
48-
[
49-
'pathStyleEndpoint' => true,
50-
'endpoint' => $_ENV['S3_ENDPOINT'],
51-
'region' => $_ENV['S3_REGION'],
52-
'accessKeyId' => $_ENV['S3_ACCESS_KEY_ID'],
53-
'accessKeySecret' => $_ENV['S3_SECRET_ACCESS_KEY'],
54-
'bucket' => $_ENV['S3_BUCKET']
55-
]
56-
);
57-
5847
return aws_s3_client([
5948
'pathStyleEndpoint' => true,
6049
'endpoint' => $_ENV['S3_ENDPOINT'],

0 commit comments

Comments
 (0)