Skip to content

The MATLAB "Java-bridge" test program fails because of the wrong data type #2933

@mwinkel-dev

Description

@mwinkel-dev

Affiliation
MIT PSFC

Version(s) Affected
client: alpha-7-153-5 (but likely applies to all recent MDSplus versions)
server: n/a
MATLAB: R2023b

Platform(s)
Ubuntu 24 (but likely applies to all platforms)

Installation Method(s)
Using the mdsplus.org package repository

Describe the bug
When using MATLAB with MDSplus, an early task is to make sure that the API's bridges are working. This is done by running the mdstest.m script in MATLAB. The Java bridge is tested with mdstest(0); the Python bridge with mdstest(1). Unfortunately, the Java bridge test expects a char but instead receives a string, so throws an error.

To Reproduce
Steps to reproduce the behavior:

  1. After installing MATLAB set its search path to include /usr/local/mdsplus/matlab.
  2. At the MATLAB >> prompt, type mdstest(0)
  3. MATLAB then generates the following error.
>> mdstest(0)
Error "string test": expected class char got string

ans =

  logical

   0

>> 

Expected behavior
The mdstest(0) should pass; no errors should be generated.

Screenshots
n/a

Additional context
Presumably, there were changes in recent versions of MATLAB that changed the returned datatype. If so, the fix likely involves a minor change to the $MDSPLUS_DIR/matlab/mdstest.m script.

This issue was observed when working on Issue #2925.

Metadata

Metadata

Assignees

Labels

api/matlabRelates to the Matlab APIbugAn unexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions