Skip to content

Adding JRF domain into ItJrfDomainInPV #1767

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 25 commits into from
Jun 29, 2020
Merged

Adding JRF domain into ItJrfDomainInPV #1767

merged 25 commits into from
Jun 29, 2020

Conversation

maggiehe00
Copy link
Member

@maggiehe00 maggiehe00 commented Jun 25, 2020

This PR is to 1) add JRF domain on PV into test class ItJrfDomainInPV and verify the servers startup and services are created; 2) fix intermittent DB pod creation failure on the remote cluster

Jenkins cluster test result:
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-model-in-image-tests-1/43/testReport/
Kind cluster test result:
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/506/testReport/oracle.weblogic.kubernetes/

private static final String RCUSYSUSERNAME = "sys";
private static final String RCUSYSPASSWORD = "Oradoc_db1";
private static final String RCUSCHEMAUSERNAME = "myrcuuser";
private static final String RCUSCHEMAPASSWORD = "Oradoc_db1";

private static String dbUrl = null;
private static int dbPort = getNextFreePort(30000, 32767);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not evaluate and assign this until you are ready to use it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -65,38 +110,31 @@
* @param namespaces injected by JUnit
*/
@BeforeAll
public static void initAll(@Namespaces(1) List<String> namespaces) {
public static void initAll(@Namespaces(3) List<String> namespaces) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now you need to initialize the logger in this method and remove the implements LoggedTest.

See #1765

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, when I merged to the latest develop branch I can see the conflicts.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

for (int i = 1; i <= replicaCount; i++) {
logger.info("Checking managed server service {0} is created in namespace {1}",
managedServerPodNamePrefix + i, jrfDomainNamespace);
checkServiceExists(managedServerPodNamePrefix + i, jrfDomainNamespace);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the checkServiceExists before checkPodReady for both admin and managed server pods.

There are instances where when service creation fails, the pods never become ready and the error log messages will be misleading

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

* @param password passowrd in the secret
*/
public static void createRcuSecretWithUsernamePassword(String secretName, String namespace,
String username, String password, String sysUsername, String sysPassword) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing params sysUsername and sysPassword in javadoc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

* @param domainUid domain UID
* @param className name of the class to call this method
*/
public static void createPV(String pvName, String domainUid, String className) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to get logger in each method it looks like.

LoggingFacade logger = getLogger();

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

* @param namespace name of the namespace in which to create the persistent volume claim
*/
public static void createPVC(String pvName, String pvcName, String domainUid, String namespace) {
logger.info("creating persistent volume claim for pvName {0}, pvcName {1}, "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create logger, same applies for methods you are adding.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

@sankarpn sankarpn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Copy link
Member

@vanajamukkara vanajamukkara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@anpanigr anpanigr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rjeberhard rjeberhard merged commit 29f22ff into develop Jun 29, 2020
@rjeberhard rjeberhard deleted the junit5-jrf2 branch January 5, 2021 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants