< prev index next >

test/javax/management/remote/mandatory/loading/MissingClassTest.java

Print this page
rev 16783 : 8176176: fix @modules in jdk_svc tests
Reviewed-by: duke


   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4915825 4921009 4934965 4977469 8019584

  27  * @summary Tests behavior when client or server gets object of unknown class
  28  * @author Eamonn McManus
  29  * @modules java.management.rmi
  30  * @run clean MissingClassTest SingleClassLoader
  31  * @run build MissingClassTest SingleClassLoader
  32  * @run main MissingClassTest
  33  * @key randomness
  34  */
  35 
  36 /*
  37   Tests that clients and servers react correctly when they receive
  38   objects of unknown classes.  This can happen easily due to version
  39   skew or missing jar files on one end or the other.  The default
  40   behaviour of causing a connection to die because of the resultant
  41   IOException is not acceptable!  We try sending attributes and invoke
  42   parameters to the server of classes it doesn't know, and we try
  43   sending attributes, exceptions and notifications to the client of
  44   classes it doesn't know.
  45 
  46   We also test objects that are of known class but not serializable.
  47   The test cases are similar.
  48  */
  49 
  50 import java.io.ByteArrayOutputStream;
  51 import java.io.IOException;
  52 import java.io.NotSerializableException;
  53 import java.io.ObjectOutputStream;




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4915825 4921009 4934965 4977469 8019584
  27  * @key randomness
  28  * @summary Tests behavior when client or server gets object of unknown class
  29  * @author Eamonn McManus
  30  *
  31  * @run clean MissingClassTest SingleClassLoader
  32  * @run build MissingClassTest SingleClassLoader
  33  * @run main MissingClassTest

  34  */
  35 
  36 /*
  37   Tests that clients and servers react correctly when they receive
  38   objects of unknown classes.  This can happen easily due to version
  39   skew or missing jar files on one end or the other.  The default
  40   behaviour of causing a connection to die because of the resultant
  41   IOException is not acceptable!  We try sending attributes and invoke
  42   parameters to the server of classes it doesn't know, and we try
  43   sending attributes, exceptions and notifications to the client of
  44   classes it doesn't know.
  45 
  46   We also test objects that are of known class but not serializable.
  47   The test cases are similar.
  48  */
  49 
  50 import java.io.ByteArrayOutputStream;
  51 import java.io.IOException;
  52 import java.io.NotSerializableException;
  53 import java.io.ObjectOutputStream;


< prev index next >