Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jakartaee-tck-dev] convert references in wrong comments?

Bill,

I would remove any unused properties(thought there is no harm if they are there) that you discover. and if you come across an obvious comment issue I would attempt to clean it up the best you can.

Best
Lance

On Mar 31, 2020, at 9:53 PM, Bill Shannon <bill.shannon@xxxxxxxxxx> wrote:

I think there's a lot of copy&paste that goes on when developing tests.
For example, in src/com/sun/ts/tests/ejb/ee/deploy/mdb/resref/single/Client.java
I see this:

 /**
  * @class.setup_props: org.omg.CORBA.ORBClass; java.naming.factory.initial;
  *                     mailuser1; webServerHost; webServerPort; mailFrom;
  *                     mailHost; jms_timeout; user; password;
  */

mailFrom and mailHost aren't referenced at all.
mailuser1 is used to set a string that used later in a test (below),
but there's no clue whether it's being used as a JavaMail user.

Then there's this:

 /**
  * @testName: testSession
  *
  * @assertion_ids: EJB:SPEC:10766
  *
  * @test_Strategy: Create a message-driven Bean declaring a resource reference
  *                 for a javax.mail.Session.
  *
  *                 Check that: - We can deploy the application. - We can
  *                 lookup the mail session. - We can use this factory to send
  *                 a mail.
  */
 public void testSession() throws Fault {

   boolean pass = false;
   String testCase = "testSession";
   int testNum = 2;

   try {
     qSender = session.createSender(mdbQ);
     createTestMessage(testCase, testNum);
     msg.setStringProperty("recipient", recipient);
     qSender.send(msg);

     if (!checkOnResponse(testCase)) {
       throw new Fault("[Client] " + testCase + " failed ");
     }
   } catch (Exception e) {
     logErr("[Client] " + testCase + " failed: " + e);
     throw new Fault("[Client] " + testCase + " failed: ", e);
   }
 }

The code doesn't correspond to the comments at all.

It looks like the test code was copied from the JavaMail test code
and then converted int JMS test code, without updating the comments.

Or, there's some magic going on here that I just don't understand and
isn't explained in the comments.


When converting javax.mail references to jakarta.mail, what should I do
with stuff like this that is almost certainly bogus?  Leave it as it is,
or convert it?
_______________________________________________
jakartaee-tck-dev mailing list
jakartaee-tck-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jakartaee-tck-dev


Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
Lance.Andersen@xxxxxxxxxx




Back to the top