Skip to content

Commit

Permalink
chore(test): use different port for Wiser in integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fushar committed Aug 4, 2023
1 parent 5e7c10a commit fcbfa6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static void startApp() throws Exception {
JophielConfiguration jophielConfig = new JophielConfiguration.Builder()
.mailerConfig(new MailerConfiguration.Builder()
.host("localhost")
.port(2500)
.port(9250)
.useSsl(false)
.username("wiser")
.password("wiser")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
import static org.junit.jupiter.api.parallel.ExecutionMode.SAME_THREAD;

import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
Expand All @@ -17,10 +16,8 @@
import judgels.jophiel.api.user.account.PasswordResetData;
import judgels.jophiel.api.user.account.UserRegistrationData;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.parallel.Execution;
import org.subethamail.wiser.Wiser;

@Execution(SAME_THREAD)
class UserAccountApiIntegrationTests extends BaseJudgelsApiIntegrationTests {
private final UserClient userClient = createClient(UserClient.class);
private final UserAccountClient accountClient = createClient(UserAccountClient.class);
Expand All @@ -29,7 +26,7 @@ class UserAccountApiIntegrationTests extends BaseJudgelsApiIntegrationTests {
@Test
void register_activate_user() {
Wiser wiser = new Wiser();
wiser.setPort(2500);
wiser.setPort(9250);
wiser.start();

accountClient.registerUser(new UserRegistrationData.Builder()
Expand Down Expand Up @@ -59,7 +56,7 @@ void register_activate_user() {
@Test
void resend_activation_email() {
Wiser wiser = new Wiser();
wiser.setPort(2500);
wiser.setPort(9250);
wiser.start();

// resend activation email with nonexistent code
Expand Down Expand Up @@ -94,7 +91,7 @@ void resend_activation_email() {
@Test
void reset_password() {
Wiser wiser = new Wiser();
wiser.setPort(2500);
wiser.setPort(9250);
wiser.start();

// allow requesting to reset random email in order not to leak info
Expand Down

0 comments on commit fcbfa6f

Please sign in to comment.