-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Convert Docs for the Junit5 #2977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
382f60b
Convert Docs for Kafka Module #1158
raynigon 59cc5a3
Merge branch 'master' into master
raynigon 2b70d92
Merge branch 'master' into master
raynigon d325804
Merge branch 'master' into master
raynigon f81b2d7
Merge branch 'master' into master
raynigon f4fe9e6
Fix #1158 for junit5
raynigon 8284fa7
Merge branch 'master' into master
raynigon 78b6f2c
Fixed new Testcase
raynigon 010f2f4
Fixed new Testcase
raynigon 82e980e
Use linenumbers instead of block, due to multiply use of the same code
raynigon ad76f88
Use linenumbers instead of block, due to multiply use of the same code
raynigon d00479b
Merge branch 'master' into master
raynigon 1e58e30
Update modules/junit-jupiter/src/test/java/org/testcontainers/junit/j…
rnorth 3f2ba32
Merge branch 'master' into master
rnorth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...les/junit-jupiter/src/test/java/org/testcontainers/junit/jupiter/MixedLifecycleTests.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.testcontainers.junit.jupiter; | ||
|
||
import org.apache.http.HttpResponse; | ||
import org.apache.http.client.HttpClient; | ||
import org.apache.http.client.methods.HttpGet; | ||
import org.apache.http.impl.client.HttpClientBuilder; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.testcontainers.containers.DockerComposeContainer; | ||
import org.testcontainers.containers.MySQLContainer; | ||
import org.testcontainers.containers.PostgreSQLContainer; | ||
import org.testcontainers.containers.wait.strategy.Wait; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
|
||
// testClass { | ||
@Testcontainers | ||
class MixedLifecycleTests { | ||
|
||
// will be shared between test methods | ||
@Container | ||
private static final MySQLContainer MY_SQL_CONTAINER = new MySQLContainer(); | ||
|
||
// will be started before and stopped after each test method | ||
@Container | ||
private PostgreSQLContainer postgresqlContainer = new PostgreSQLContainer() | ||
.withDatabaseName("foo") | ||
.withUsername("foo") | ||
.withPassword("secret"); | ||
|
||
@Test | ||
rnorth marked this conversation as resolved.
Show resolved
Hide resolved
|
||
void test() { | ||
assertTrue(MY_SQL_CONTAINER.isRunning()); | ||
assertTrue(postgresqlContainer.isRunning()); | ||
} | ||
} | ||
// } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately i had to create a new test class, to have the code representing nearly the same logic as the previous documentation