Skip to content

Commit

Permalink
Use .gitignore solution for BugRepro
Browse files Browse the repository at this point in the history
  • Loading branch information
SMadani committed Dec 2, 2024
1 parent 420285a commit 24b3d00
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ out/
.DS_Store
pom.xml.releaseBackup
pom.xml.versionsBackup
src/test/java/BugRepro.java
5 changes: 2 additions & 3 deletions src/test/java/BugRepro.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import java.util.*;

/**
* Convenience class for debugging / live testing. This file is ignored using the command
* `git update-index --skip-worktree src/test/java/BugRepro.java` to prevent accidental commits ot the repository.
* Convenience class for debugging / live testing. You should copy this file and remove the
* `.template` extension from the filename to make it usable.
*/
public class BugRepro {
public static void main(String[] args) throws Throwable {
Expand All @@ -19,7 +19,6 @@ public static void main(String[] args) throws Throwable {

try {
// Debug code here
// client.getVoiceClient().createCall(new Call(TO_NUMBER, System.getenv("VONAGE_NUMBER"), "https://example.com/answer"));

System.out.println("Success");
}
Expand Down
29 changes: 29 additions & 0 deletions src/test/java/BugRepro.java.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import com.vonage.client.*;
import java.util.*;

/**
* Convenience class for debugging / live testing. You should copy this file and remove the
* `.template` extension from the filename to make it usable.
*/
public class BugRepro {
public static void main(String[] args) throws Throwable {
String TO_NUMBER = System.getenv("TO_NUMBER");

VonageClient client = VonageClient.builder()
.httpConfig(HttpConfig.builder().timeoutMillis(12_000).build())
.apiKey(System.getenv("VONAGE_API_KEY"))
.apiSecret(System.getenv("VONAGE_API_SECRET"))
.applicationId(System.getenv("VONAGE_APPLICATION_ID"))
.privateKeyPath(System.getenv("VONAGE_PRIVATE_KEY_PATH"))
.build();

try {
// Debug code here

System.out.println("Success");
}
catch (Exception ex) {
ex.printStackTrace();
}
}
}

0 comments on commit 24b3d00

Please sign in to comment.