Skip to content

Commit 4995abb

Browse files
ichokshiichokshi
authored andcommitted
UnitTest changes
1 parent 6a4008a commit 4995abb

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
user=OKafka
2+
password=Welcome_123#

clients/src/test/java/org/oracle/okafka/tests/OkafkaSetup.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ public static Properties setup(){
1313
final Properties BaseProperties = new Properties();
1414
InputStream input;
1515
try {
16-
input = new FileInputStream("config.properties");
16+
input = new FileInputStream("src/test/java/test.config");
1717
BaseProperties.load(input);
1818
} catch (Exception e) {
1919
System.out.println("Exception whlie loading config.properties file. " + e);
2020
e.printStackTrace();
2121
}
2222
return BaseProperties;
2323
}
24-
25-
2624
}

clients/src/test/java/org/oracle/okafka/tests/TestRunner.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
package org.oracle.okafka.tests;
2-
import java.util.Scanner;
32

43
import org.junit.runner.JUnitCore;
54
import org.junit.runner.Result;
@@ -20,7 +19,6 @@ public static void main(String[] args) {
2019
System.out.println("Test failure : "+ failure.toString());
2120
}
2221
System.out.println("Tests ran succesfully: " + result.wasSuccessful());
23-
2422
}
2523
}
2624

clients/src/test/java/test.config

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#OKafka common properties for common examples
2+
3+
#Properties to connect to Oracle Database
4+
#Option 1: Connect to Oracle database using plaintext
5+
6+
security.protocol=PLAINTEXT
7+
bootstrap.servers=localhost:1521
8+
oracle.service.name=FREEPDB1
9+
oracle.net.tns_admin=./src/test/java
10+
11+
#Option 2: Connect to Oracle Database deployed in Oracle Autonomous Cloud using Wallet
12+
#security.protocol=SSL
13+
#oracle.net.tns_admin=<location of Oracle Wallet, tnanames.ora and ojdbc.properties file>
14+
#tns.alias=<tns alias>

0 commit comments

Comments
 (0)