You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the resource you provided here to create an S3 client.
`@RegisterExtension
static final S3MockExtension S3_MOCK =
S3MockExtension.builder().silent().withSecureConnection(false).build();
private S3Client s3Client;
@Before
public void setUp() {
s3Client = S3_MOCK.createS3ClientV2();
s3Client.createBucket(CreateBucketRequest.builder().bucket("my-bucket").build());
}`
However, I'm encountering the following error:
java.lang.NullPointerException: Cannot invoke "com.adobe.testing.s3mock.S3MockApplication.getHttpPort()" because "this.s3MockFileStore" is null
It seems that the mock isn’t initializing the endpoint correctly. From what I’ve read, JUnit 5 doesn’t require manually starting S3MockStarter, but I suspect this might be the issue.
Any insights on this?
Thanks!
The text was updated successfully, but these errors were encountered:
Hi,
the file you linked is the Junit5 test that we use to test that the extension works on every commit.
Not sure why it wouldn't work for you - maybe your Junit5 is not configured correctly? Or the port (9090, 9191) is already in use.
Also, the S3Client is provided by the extension, you can just add it as a function parameter.
Hello,
I'm using the resource you provided here to create an S3 client.
However, I'm encountering the following error:
java.lang.NullPointerException: Cannot invoke "com.adobe.testing.s3mock.S3MockApplication.getHttpPort()" because "this.s3MockFileStore" is null
It seems that the mock isn’t initializing the endpoint correctly. From what I’ve read, JUnit 5 doesn’t require manually starting S3MockStarter, but I suspect this might be the issue.
Any insights on this?
Thanks!
The text was updated successfully, but these errors were encountered: